[Pythonmac-SIG] Packages

Just van Rossum just@letterror.com
Wed, 26 Aug 1998 01:38:11 +0200


>I am working a little on getting the openGL extension working on the mac
>with the latest Mesa libraries. One question that comes up is how to work
>with packages. Do all the directories involved have to be added to sys.path?
>
>In testing this package I get
>
>from OpenGL.GL import *
>ImportError: No module named OpenGL.GL
>
>I have added PyOpenGL-1.5.3:OpenGL and PyOpenGL-1.5.3:OpenGL:GL to the
>path. I get the same message whether the second is added or not.
>
>So I guess I am asking whether packages work in the Mac version! Are there
>any others out there to test?

Packages work just fine on the Mac. The folder in which the OpenGL folder
lives should be on sys.path (not OpenGL itself), and the OpenGL folder
*must* contain a __init__.py file (it may be empty, though). It then it
depends on what's in OpenGL or it's __init__.py file whether there is a
submodule called GL...
Does import OpenGL work?

Just