python bytecodes by hand

Robert Brewer fumanchu at amor.org
Wed Aug 25 16:39:47 CEST 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