From: Kevin A. <al...@se...> - 2005-04-05 19:18:41
|
On Apr 5, 2005, at 12:03 PM, bra...@om... wrote: > > "Kevin Altis" <al...@se...> wrote on 04/05/2005 01:35:41 PM: > > > When I post a change like this it means that the code in the CVS > > repository changed and will be in the next release distribution. If > you > > want to stay current with changes and test before the next release > you > > need to work off of a copy of PythonCard from the SF CVS repository. > > > > The next release is not scheduled until sometime in May, after I get > > back from the UK. > > Ok, I downloaded from CVS into a special directory (separate from my > Mac's /Library/Python/2.3 directory). So, if I add this to my > sys.path, so as to import the CVS copy of PythonCard, I should be able > to start using platform-specific resource filenames and PythonCard > will automatically detect the platform and select the correct resource > file? > Create a PYTHONPATH environment variable and set it to the special directory which holds the PythonCard directory. Python will search in the PYTHONPATH before the standard lib dirs. On the Mac, you'll want to create an environment.plist file so that the PYTHONPATH is used regardless of whether you're running from the Terminal or Finder, since on the Mac those are considered different as far as how environment variables are found. The file will look something like this, substitute your own username for "username" below. You only need the CVS_RSH key if you do CVS checkins for some package. The environment.plist is a leftover from the Next days of OS X, IIRC ;-) If you search on Google you should find more about PYTHONPATH and environment.plist. Also, I think the file needs to end in linefeeds (Unix) not carriage returns (Mac Finder) and yes it is annoying that Apple brought that legacy of classic Mac into Mac OS X. If you run your application with one of the debug options like -d you can check the About dialog to make sure you have the right versions of Python, wxPython, and PythonCard. The PythonCard version number in CVS is 0.8.2. cat ~/.MacOSX/environment.plist <?xml version="1.0 encoding="UTF-8"?> <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> <plist version="0.9"> <dict> <key>CVS_RSH</key> <string>ssh</string> <key>PYTHONPATH</key> <string>/Users/username/python</string> </dict> </plist> ka |