[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Proposal: Reorganizing Python for Python2 (and fixes for the previous proposal)



On Wed, Jan 10, 2001 at 10:07:16AM -0600, Rob Tillotson wrote:
> D-Man <dsh8290@rit.edu> writes:
> > (Does anyone know where the bytecode format is documented?  I am
> > interested in understanding how bytecode works and is designed.)
> 
> As far as I know it's only documented in the source.  The standard
> module "dis.py" might be useful to look at as well (it's a bytecode
> disassembler).

Something else that may be of interest from the Misc/NEWS file of
python2:

- The interpreter accepts now bytecode files on the command line even
  if they do not have a .pyc or .pyo extension. On Linux, after
  executing

  echo ':pyc:M::\x87\xc6\x0d\x0a::/usr/local/bin/python:' >
  /proc/sys/fs/binfmt_misc/register

  any byte code file can be used as an executable (i.e. as an
  argument to execve(2)).
  
As noted in the thread above, it does say the bytecode is incompatibile
between 1.5-->1.6-->2.0 however.



Reply to: