Python code persistance

Andre Michel Descombes amdescombes at
Wed Aug 28 16:31:07 CEST 2002


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

More information about the Python-list mailing list