Re: saving pre-compiled scripts
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.python archive

Re: saving pre-compiled scripts

From: Derek van Vliet <dvanvliet@3dna.net>
Date: Thu Jun 30 2005 - 22:29:53 CEST

Another thing which may be important to note re: my constraints is that
each script is essentially being run as a function.

In fact, every script element I parse in XML gets wrapped in a function
def before I send it to Py_CompileString.

I then PyEval the result of that function, and then run
Py_CompileString again, passing only the automatically generated
function call.

The result of the second Py_CompileString is what I pass to
PyEval_EvalCode whenever my app needs to run that script (function).
Received on Thu Sep 29 16:40:31 2005