Newbie Question (executing Program from within)
Matt Gerrans
mgerrans at mindspring.com
Mon Jun 10 03:26:01 EDT 2002
# This will do the trick:
def runScript(filename):
namespace = { '__name__' : '__main__' }
execfile(filename, namespace)
return namespace
# - mfg
More information about the Python-list
mailing list