|
|
|
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 
Steve Holden |
Homepage |
06/02/13 - 2:12 am | #
|
|
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
Fuzzyman |
Homepage |
06/02/13 - 3:09 pm | #
|
|
It's not done in Python code, but the standard library happens to have an example of how to do it in Python code.
Bob Ippolito |
Homepage |
06/02/13 - 6:41 pm | #
|
|
|
Commenting by HaloScan
|