init.py: runscript() now works on Python 2.6 too. Thanks to Christian Blichmann for the patch.

This commit is contained in:
gergely.erdelyi 2009-08-28 17:03:59 +00:00
parent 013546b569
commit ab34ed6573

View File

@ -61,7 +61,7 @@ def runscript(script):
sys.argv = [ script ]
# Adjust the __file__ path in the globals we pass to the script
g = globals()
old__file__ = g['__file__']
old__file__ = g['__file__'] if '__file__' in g else ''
g['__file__'] = script
try:
execfile(script, g)