"Vincent A. Primavera" <vincent_a_primavera at netzero.net> writes: > Hello, > I am in the process of converting a Unix shell script into > Python. What can I do to set and export a path equivalent to > PATH=:/usr/bin; export PATH? That PATH setting doesn't seem to make sense because it begins with a separator, but anyway the equivalent would be: import os os.environ['PATH'] = ':/usr/bin' Python exports all environmental variables when starting a new process, as long as your C library has a putenv() function. (If it doesn't, then you will need to pass the new environment explicitly to the function that creates the new process.) -- Any opinions expressed are my own and not necessarily those of Roundpoint.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4