[ pyopengl-Bugs-1712741 ] glutInit changes working directory

"SourceForge.net" <[email protected]>
Newsgroups gmane.comp.python.opengl.devel
Message-ID <[email protected]>
Bugs item #1712741, was opened at 2007-05-04 09:45
Message generated for change (Settings changed) made by mcfletch
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1712741&group_id=5988

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: GLUT
Group: v3.0.0
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Renaud Blanch (blanch)
Assigned to: Nobody/Anonymous (nobody)
Summary: glutInit changes working directory

Initial Comment:
Calling glutInit changes the working directory to the python executable path.

reproducing
-----------

from OpenGL.GLUT import *
import os
import sys

cwd = os.getcwd()
glutInit(sys.argv)
assert cwd == os.getcwd(), "changed!"


versions
--------
MacOSX 10.4.9
python version: 2.5.1
PyOpenGL version: 3.0.0a6


workaround
----------

cwd = os.getcwd()
glutInit(sys.argv)
try:
   assert cwd == os.getcwd()
except AssertionError:
   os.chdir(cwd)



----------------------------------------------------------------------

Comment By: Mike C. Fletcher (mcfletch)
Date: 2007-05-20 12:51

Message:
Logged In: YES 
user_id=34901
Originator: NO

PyOpenGL 2.x had a work around for this on OSX.  Looks like it's some sort
of weird OSX bug.  Sigh.  Anyway, have checked in code to restore CWD after
the glut initialisation call...

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1712741&group_id=5988

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
PyOpenGL Homepage
http://pyopengl.sourceforge.net
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.