Re: [PyOpenGL-Users] py2exe and pyopengl?
Brought to you by:
mcfletch
From: Dan H. <Dan...@no...> - 2010-02-17 17:55:54
|
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 |