On May 10, 2005, at 5:14 AM, [EMAIL PROTECTED] wrote: > Bob Ippolito writes: > > >> Well, you might think that you have particularly good reasons to use >> PYTHONPATH, but pth files can do the same thing in a more predictable >> > > My particularly good reason is that I set PYTHONPATH differently in > different shell environments for testing purposes. Changing links > and path > files is a lot more work.
I use different checkouts (or python interpreters) for different environments... >> way. Perhaps it should ignore PYTHONPATH, but why? NOTHING else >> does. >> It targets every single python interpreter in the system, why >> should this >> be any different? >> > > py2app makes a big effort to make the package independent of the > particular > system environment on which it runs. PYTHONPATH is part of the system > environment. > > From a more pragmatic point of view, I don't see how respecting > PYTHONPATH > could do anyone any good (except people who intentionally modify the > behaviour of an installed package, but they usually know what they are > doing), and it can do a lot of harm by executing different code > than the > packager intended. Well I went ahead and changed the default behavior to ignore PYTHONPATH. > In the worst case, a system administrator sets PYTHONPATH for whatever > reason, and the user who clicks on an application doesn't even know > about > it. He reports a crash to the developer who doesn't suspect > anything either. However, I still don't quite agree with you. There are PLENTY of environment variables that you should only set if you know what you're doing, and you should only set as a software developer. The DYLD variables come to mind. Setting PYTHONPATH is a lot like setting DYLD_LIBRARY_PATH. Both have their obscure uses, and both will explode in your face if you use them naively. A system administrator should never, ever, be setting PYTHONPATH. -bob _______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig