This isn’t a question, but rather me reporting something I figured out that other people might find useful.
I’m using Panda on OSX using pro-rsoft’s just released package. His dmg includes a script that’ll automatically set some environment variables in your .bash_profile so that Panda will run correctly. With those .bash_profile settings, you can launch Panda from Terminal just by typing “python myprogram.py” in the terminal window.
Now that’s pretty great, but one minor inconvenience that was bugging me was that Panda wasn’t working when I clicked Run in my IDE. Well I did a bit of snooping online, and what I realized is that .bash_profile only applies to Terminal. To set environment variables to use with GUI applications (like an IDE) you need to put those settings in your environment.plist file. Refer to this page on Apple’s developer site:
developer.apple.com/qa/qa2001/qa1067.html
Once I had put the paths into environment.plist (and relogged so that the changes would take affect; that threw me for a bit ) I could run Panda programs just by clicking Run in my IDE. woo
To edit your environment.plist, click Go To Folder in the Finder’s Go menu and type in ~/.MacOSX/ (if this folder doesn’t exist yet, that developer page above mentions how to create it.) Use the PropertyListEditor app in Developer tools (/Developer/Applications/Utilities/PropertyListEditor) and add the following items to the list:
key: PATH string: /Applications/Panda3D/1.6.0/bin:$PATH
key: PYTHONPATH string: /Applications/Panda3D/1.6.0/lib:$PYTHONPATH
key: DYLD_LIBRARY_PATH string: /Applications/Panda3D/1.6.0/lib:$DYLD_LIBRARY_PATH
Incidentally, although this information will apply to any IDE, the editor I was trying to get Panda working in was TextWrangler. TextWrangler is a free Mac application from BareBones Software (they’re best known for BBEdit, and TextWrangler is very similar) that I highly recommend to any Python developers working on a Mac. I had already been using it for months as a great plain text/HTML editor, but I only learned last week that it has programming tools like syntax highlighting and function navigation.