| |||||||||||
PyWeek - py2exe problemI tried making an exe, but got this strange error... has it to do with the skellington or did I do smth wrong?C:\simono-0.4\dist>run_game.exe Traceback (most recent call last): File "run_game.py", line 3, in ? NameError: name '__file__' is not definedso it's already grinding to an halt in run_game?? other people of succesfully provided exe... so what's my mistake? — simono on 2007/04/04 17:19 of Ninja on the Wall Comments: (log in to comment) |
Last Challenge
September 2008 [entries, ratings] Previous March 2008 [entries, ratings] September 2007 [entries, ratings] > April 2007 [entries, ratings] September 2006 [entries, ratings] March 2006 [entries, ratings] (June 2006) August 2005 [entries, ratings] Not logged in Login | ||||||||||
By erik on 2007/04/04 17:29:
It looks like you have an old copy of the skellington. The version of run_game.py currently available from the help page has the following code in it:try: libdir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib')) sys.path.insert(0, libdir) except: # probably running inside py2exe which doesn't set __file__ passBy simono on 2007/04/05 01:30:
ah nice, got it