Loading functions from a file during run-time
tjprojects_usenet at yahoo.com
tjprojects_usenet at yahoo.com
Tue Feb 15 22:24:09 EST 2005
I have to say, I was skeptical about your execution method at first --
simply joining all of the lines and then compiling them. My
understanding of the compile method from the documentation led me to
believe that you needed to process a line at a time. ''.join ing them
all seems to work very well, however, and it's a lot easier!
My comments about 'exec obj in globals()' still stand, however. Give
it a try and let me know if it works the way you expect.
T.J.
More information about the Python-list
mailing list