The Voidspace Techie Blog

Gravatar Use the source, Luke! The application that creates .pyc files is an open source prject, after all. When I needed to know how to compile code for import from a database I grepped the standard library for ".pyc" and pretty soon came up with py_compile.py. No need for a lot of Googling


Gravatar Thanks Steve. I foolishly assumed that going from bytecode to code object would be in C. By the time I had worked out that they were being 'marshal'ed I should have realised it was done in Python code.

Fuzzy


Gravatar It's not done in Python code, but the standard library happens to have an example of how to do it in Python code.


Name:

Email:

URL:

Comment:  ? 

 

Commenting by HaloScan