A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2001-April/078186.html below:

Paths...

Paths... Paths...Ben Hutchings ben.hutchings at roundpoint.com
Thu Apr 5 21:39:24 EDT 2001
"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.

More information about the Python-list mailing list

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