Python code persistance
Martin Franklin
mfranklin1 at gatwick.westerngeco.slb.com
Wed Aug 28 12:10:09 EDT 2002
On Wednesday 28 Aug 2002 2:31 pm, Andre Michel Descombes wrote:
> Hi,
>
> I am using PythonForDelphi to execute some dynamic code coming from a
> string using the Exec function. The problem I have, is this string can be
> quite long and it takes quite a while to compile it everytime in order to
> call the several functions defined within it. Is it at all possible to
> persist this compiled code to disk or database in order to be able to just
> load it (without having to recompile it) the next time the program is run?
> I don't want to save it to a .py file if it can be avoided.
>
> Thanks for your help,
>
> Andre M. Descombes
Take a look at the marshall module:-
http://www.python.org/doc/current/lib/module-marshal.html
Cheers,
Martin.
More information about the Python-list
mailing list