Re: [Pyobjc-dev] Re: [Pyobjc-checkins] CVS: pyobjc/Examples/TableModel2 main.m,1.4,1.5
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2002-11-22 21:52:37
|
Ronald Oussoren wrote: > BTW. There is no need to convince me about using Python instead of C :-) Oh, in my mind I was actually talking to Bill ;-) > > When building an applet: > > - append PYTHONPATH (not prepend as that kindof defeats its purpose) > > > > When building a fully standalone app: > > - set PYTHONHOME to something inside the bundle, just to make sure > > no modules can be loaded from anywhere but the bundle > > - set or replace PYTHONPATH. A bogus PYTHONPATH could otherwise > > break the app. > Sounds good, but how are you going to deal with moving the .app bundle > when not using /usr/bin/python? '#!../Resources/python-interpreter' > probably won't work. Standalone apps are probably the most important > for not using a python-based main. It works by the assumption that there is _a_ python available as /usr/bin/env python. This is safe as of Jaguar, unless someone has actually deleted python. Tough luck for those. The _real_ (python) executable is copied to Contents/Resources/ and the bootstrapping code calculates its path just like it calculates the path to the real main script. It passes this path to os.execve. The bundle can be moved anywhere. Just |