Re: [Pyobjc-dev] NSApplicationMain idiom: wish to standardize
Brought to you by:
ronaldoussoren
From: Just v. R. <ju...@le...> - 2003-03-21 20:40:10
|
Ronald Oussoren wrote: > P.S. bundlebuilder.py from the current Python CVS doesn't work for me, > I get #!python2.3 at the start of the bootstrap script. That's probably > because 'which python' is '/usr/local/bin/python' and that is a > symlink to 'python2.3' in the same directory. This fragment of code > doesn't work correctly with that: > hashbang = sys.executable > while os.path.islink(hashbang): > hashbang = os.readlink(hashbang) > > The second time through the loop hashbang is 'python2.3', which > doesn't exist. The assignment should probably be something like > 'os.path.join(os.dirname(hashbang), os.readlink(hashbang))' Beh -- but thanks for reporting it! I changed it (reluctantly) from #!/user/bin/python to what you see now by Jack's request, basically so the same interpreter is used for bootstrapping and running the applet (if it's a standalone app we use /usr/bin/python). It seems a micro optimization that caused more trouble than it's worth. Unless I get some more arguments for using an improved readlink approach, I'll go back to hardcoding it again, or possibly using #!/usr/bin/env python. Just |