2001-12-12 21:14:09 UTC
I am now using:
#
sExtraCode='other_code12.py'
execfile(sExtraCode,globals())
TestCommand = CommandCode()
TestCommand.doCommand(sRunCommandArgs)
TestCommand = None
#
Where other_code12.py contains class CommandCode with method doCommand. Each time the code is run the object TestCommand is redefined and runs the code in file that is in the string sExtraCode. Every time the code is run in the project sExtraCode can contain different paths to python modules. I am using this method to make the python modules act as plug-in files. Just write a python module and drop it in the bin folder and it starts acting as an extension of the project.
So I guess execfile method was just what I needed.