Re: Using marshal to manually "import" a python module

2007-11-29 Thread Martin v. Löwis
> The strange thing is, it worked fine locally on my two machines (32bit > running python 2.3.5 and 64bit running python 2.4.1), but when run by a > 64bit machine on the network, it would fail every time in the following > manner: It may not that much be an issue of 32-bit vs. 64-bit, but of Pytho

Using marshal to manually "import" a python module

2007-11-29 Thread David Hirschfield
I had a situation recently that required I manually load python bytecode from a .pyc file on disk. So, for the most part, I took code from imputil.py which loads the .pyc data via the marshal module and then exec's it into a newly created module object (created by imp.new_module()). The relevan