
-----------------------------------
elorah
Wed Dec 01, 2010 9:49 am

Need help installing graphics library on Mac Python
-----------------------------------
I am trying to figure out how to install the graphics library on Mac Python. My teacher told me that on Windows you just copy and paste the graphics.py file into Lib, but we cannot figure out how to do something like that on Mac Python. Do I need a different library (I have the graphics.py file)? Could someone please tell me how to do this? Also if it helps any I am using a MacBook Pro.
Thanks

-----------------------------------
DtY
Wed Dec 01, 2010 9:21 pm

RE:Need help installing graphics library on Mac Python
-----------------------------------
"graphics.py" is not a standard python library. Is this something your teacher gave you?

What you are going to need to do is put that file somewhere in the path. The path is where the python interpreter will look for python files when you import something (the lib directory you mentioned before is in the path). The easiest place to put it would be in the same directory as your python scripts (the path always includes the directory where your python file is), but this may mean having multiple copies of it.

If you open up the python interpreter, sys.path is a list of all the directories in the path:
open directory, ie. open  /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/
