[Pythonmac-SIG] Python on on a second drive

Jack Jansen jack@oratrix.nl
Fri, 13 Oct 2000 17:55:08 +0200

> It sounds as if the PythonCore alias points to something that isn't
> "extension-like".  In that case, perhaps you could provide an alternate but
> well known location, such as
> ...:System Folder:Preferences:MacPython:PythonCore (probably for post 2.0).

Correct. But: putting it somewhere else than in Extensions isn't going to work 
(as far as I know), because Extensions is the only place that is searched for 

Let me quickly explain the reason for putting the alias there in the first 
place. Maybe someone here has a bright idea for organizing things differently 
so we don't need it.

PythonInterpreter (and the Applet main program code, which is actually the 
same code) is a tiny executable which is linked against the PythonCore shared 
library. The code is also little more than a single subroutine call (to the 
"real" main program, which lives in PythonCore). We want PythonInterpreter to 
be tiny, because it will be included in each and every applet you have.

The reason to have an alias to PythonCore in Extensions is that this allows 
applets to live anywhere on your disk. When you use a shared library the 
operating system searches for that shared library in two places: the 
application folder (i.e. the folder from where you double-clicked the applet) 
and the Extensions folder.

The reason to have an _alias_ there (as opposed to the real PythonCore 
library) is that this is about the only way that you can have two Python 
installations on the same disk. Because the application folder is searched 
before the Extensions folder I can have both 1.5.2 and 2.0 on my machine. 
Whenever I run PythonInterpreter from the 1.5.2 folder it'll pick up the 1.5.2 
PythonCore from that folder.  Whenever I run PythonInterpreter from the 2.0 
folder it'll pick up the 2.0 PythonCore from that folder. Whenver I run an 
applet that is in neither folder it'll go to the extensions folder and use the 
PythonCore from there (which will be whichever one was installed last, I 
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm