Re: Environment variable issues running py2app application

Ronald Oussoren <[email protected]>
Newsgroups gmane.comp.python.apple
Message-ID <[email protected]>
On 25 Apr, 2013, at 16:29, Paul Wiseman <[email protected]> wrote:
> To reset the path, would I just update the PATH entry in the os.environ dict? Presumably I could just add /usr/bin:/usr/sbin to the start of PATH when the app starts up, then I should be ok?

Yes, "os.environ['PATH'] = '/usr/bin:/usr/sbin:' + os.environ['PATH']" would work, and would ensure that system binaries are prefered over binaries in other locations regardless of the environment of the user.

Ronald

_______________________________________________
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.