imp.loadmodule creates compiled file

Thomas Heller theller at python.net
Wed Jun 19 10:28:11 EDT 2002


"Neil Hodgson" <nhodgson at bigpond.net.au> wrote in message news:zv%P8.332187$o66.856939 at news-server.bigpond.net.au...
>    I've been using imp.loadmodule with Python 2.2 (on both Windows and
> Linux) to load changed versions of source code into a long running process
> where they will run alongside objects already created from earlier versions
> of the source code. An unexpected result of the call is to create a compiled
> module on disk with a name based on the filename argument with "c" appended.
>

There has been a thread named "Importing a module without creating a .pyc/.pyo file?"
recently. I'm not sure this link will work, otherwise search google yourself.
http://groups.google.com/groups?hl=de&lr=&ie=UTF8&oe=UTF8&safe=off&th=5a6c36264f7b6d07&rnum=65

IIRC, there have been several useful suggestions.

Thomas





More information about the Python-list mailing list