[Pythonmac-SIG] MachoPython 2.2.2 build question
Jack Jansen
Jack.Jansen@oratrix.com
Sun, 10 Nov 2002 21:02:50 +0100
On zaterdag, nov 9, 2002, at 19:41 Europe/Amsterdam, Russell E Owen
wrote:
> Regarding an earlier post about trouble with PYTHONSTARTUP, I have
> more info on it. Defining the environment variable in
> ~/.MacOSX/environment.plist does work fine for plain "python" (despite
> my earlier report to the contrary); however it still does *NOT* work
> for pythonw (it shows up in os.environ but the file is not actually
> run when pythonw starts up).
The problem is that in 2.2.2 pythonw is based on the macmain.c main
program, the same as used for MacPython. python uses the standard Unix
main.c main program. The macmain.c code doesn't know about environment
variables. As of 2.3a0 this has been changed and the two binaries are
now actually identical.
For pythonw you could put the startup code in a file called
"PythonStartup", but unfortunately that file has to live in the current
directory.
>
> What I did wrong the first time was use ~ in my definition of the
> environment variable. I'd forgotten that ~ is not expanded when it
> appears in ~/.MacOSX/environment.plist. (I've also posted a page about
> using this file to define environment variables for MacOS X native
> applications, and have linked to it from my "how to build Python
> 2.2.2" page).
Boo! Hiss!
I would file an Apple bug report for this if I were you.
--
- Jack Jansen <Jack.Jansen@oratrix.com>
http://www.cwi.nl/~jack -
- If I can't dance I don't want to be part of your revolution -- Emma
Goldman -