[Pythonmac-SIG] More ? on Python Path/Resources...

vze26m98 vze26m98 at optonline.net
Mon Mar 22 09:10:25 EST 2004


Hi Jack-

Thanks for your earlier post about the EditPythonPrefs application. I've
had a chance to try it out briefly, but I still think I'm missing
something.

The application does indeed modify the 'STR#' resource in the
PythonCoreCarbon, altering the sys.path variables.

I think I'm having trouble with setting the $PYTHON variable, however.

I've noticed that the MacPython Preferences file in the system folder
contains an 'alis' resource that appears to hold the full pathname of
the folder that PythonCoreCarbon resides in.

PythonCoreCarbon itself has the 'STR#' resource, but no 'alis' resource.
It does have an 'STR' resource which contains a PythonPreferenceFilename
string which is set to the name of the preferences file. The actual data
area ($) for that string is blank in my current setup.

As I said, I have an application that is using PythonCoreCarbon in an
embedded situation under OSX and it seems not to know about the OS9
Preferences folder.

So I'm assuming that when my application runs, it finds an alias in it's
startup folder to PythonCoreCarbon in the MacPython directory.
PythonCoreCarbon, in turn, it doesn't find the location of the
Preferences file, nor does it find what $PYTHON has been set to. So it
defaults to my application's startup folder.

Do I need to provide the full pathname of the MacPython folder as data
to the PythonPreferenceFilename? Or do I need to copy the 'alis'
resource in the MacPython Preferences file into PythonCoreCarbon?

Perhaps the configuration I'm trying to set up simply isn't possible.

Anyway, thaks in advance for any help!

Best,

Tad Turner


<tad at propheticdesire.com>



More information about the Pythonmac-SIG mailing list