#163 glutInit changes working directory

v3.0.0
closed-fixed
nobody
GLUT (25)
5
2007-05-20
2007-05-04
No

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)

Discussion

  • Mike C. Fletcher

    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...

     
  • Mike C. Fletcher

    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks