Executing Python scripts in Python?
Richard
richardd at hmgcc.gov.uk
Tue Mar 25 03:13:41 EST 2003
Hi,
I am currently writing an application in Python that (amongst other things)
processes incoming data from multiple socket network connections. The
incoming data on each socket is in a different format, although they all
convey the same data.
I want my Python program to execute other Python scripts (in threads),
passing to them (or making available to them) an object containing a
connected socket and a ton of data fields for it to populate from the
received (and processed) socket data. These scripts cannot be hard-coded
into the appliocation as I need to be able to change the scripts while the
main program is running.
I have seen in the Python Library Reference the 'code' module and think that
this might be able to help me. However I can't find any examples of its use
that applies to my situation.
Has anyone got any ideas?
Thanks
Richard
More information about the Python-list
mailing list