Re: [PyOpenGL-Users] py2exe and pyopengl?
Brought to you by:
mcfletch
From: Craig B. <cd...@gm...> - 2010-02-17 18:16:18
|
Hm, seems like that would only make a difference if I were running main.exe from a dir other than dist, which I was not. I can try it out this evening, but I'm not optimistic. On Wed, Feb 17, 2010 at 09:55, Dan Helfman <Dan...@no...> wrote: > Craig Berry wrote: >> >> Okay, neither of the provided recipe variants worked. >> >> I have this at the top of my main.py, the main module: >> >> import sys >> sys.path.insert(0, '.') > > You might try something like this instead: > > # See http://www.py2exe.org/index.cgi/WhereAmI > if hasattr( sys, "frozen" ): > if sys.frozen == "windows_exe": > main_dir = os.path.dirname( > unicode( sys.executable, sys.getfilesystemencoding() ) > ) > sys.path.append( main_dir ) > os.chdir( main_dir ) > else: > sys.path.insert( 0, "." ) > > Dan > > -- Craig Berry - http://www.cine.net/~cberry/ "Lots of things in the universe don’t solve any problems, and nevertheless exist." -- Sean Carroll |