python bytecodes by hand

Robert Brewer fumanchu at amor.org
Wed Aug 25 10:39:47 EDT 2004


Maurice LING wrote:
> I am just wondering about the structure of a pyc (python 
> bytecode) file 
> and has anyone successfully write a functional pyc file by hand?

Yes, they have. Although, generally, you either:

1) write a program to generate the bytecode for you in some non-standard
way, or
2) declare a similar target in Python, grab its bytecode, and tweak it
as needed.

Google for "Python bytecode hack".


Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org



More information about the Python-list mailing list