Load Python Scripts from Memory

Dean Ellis dean.ellis at capitaes.co.uK
Wed Nov 12 15:54:02 EST 2003


Thanks for all the suggestions guys. 

I have to admit writing my own import function sounds a bit daunting. 
I think it might help if a clarify what I need to do.

Basically, my application is written in C/Delphi (what ever) and
provides a Host API to python to allow scripts to modify the
application objects. What we would like to support is a form of
automation, i.e we have a pre-compiled python script on our trusted
server, the application loads on the client machine detects there is a
new script and downloads it into memory, it then runs that script in
python. This could be done by saving the compiled script to a file
before running but I would prefer not to.

I did have a play with the PyCodeObject but I couldn't get it to work.

Dean




More information about the Python-list mailing list