Embedding UNIX Commands
Kalle Svensson
kalle at gnupung.net
Mon Feb 12 19:42:58 EST 2001
Sez D-Man:
> If you simply want to change the environment of your python process
> you can :
>
> import sys
> sys.env[ "VAR" ] = "value"
>
>
> (also possibly the sys.setenv() function, try dir( sys ) , and print
> sys.setenv.__doc__ )
That should be
import os
os.environ["VAR"] = "value"
os.putenv()
dir(os)
and
print os.putenv.__doc__
I believe. At least with Python 2.x.
Check http://www.python.org/doc/current/lib/os-procinfo.html for more info.
Otherwise, I agree with the previous speaker...
Peace,
Kalle
--
Email: kalle at gnupung.net | You can tune a filesystem, but you
Web: http://www.gnupung.net/ | can't tune a fish. -- man tunefs(8)
PGP fingerprint: 0C56 B171 8159 327F 1824 F5DE 74D7 80D7 BF3B B1DD
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20010213/412acf01/attachment.sig>
More information about the Python-list
mailing list