[Pythonmac-SIG] Environment variable issues running py2app application
Ronald Oussoren
ronaldoussoren at mac.com
Thu Apr 25 16:34:51 CEST 2013
On 25 Apr, 2013, at 16:29, Paul Wiseman <poalman at gmail.com> 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
More information about the Pythonmac-SIG
mailing list