[Tutor] Unix Environment variables

Amit Saha amitsaha.in at gmail.com
Sun Jun 23 23:35:47 CEST 2013


Hello,

On Tue, Jun 18, 2013 at 9:58 AM, Anu Bhagat <abhagat at seti.org> wrote:
> Hi I am fairly new to python. I will greatly appreciate if some one can tell
> me how set up environment variables from a python script.
>
> Thanks in advance.

You can use the 'os' module. This is the document for Python 2 [1].
That should help you retrieving/setting environment variables.

[1] http://docs.python.org/2/library/os.html#os.environ

Best,
Amit.

>
> Anu
> --
> Nothing is impossible, the word itself says 'I'm possible'. Audrey Hepburn
>
> Anu Bhagat
> SETI Institute
> 189 North Bernardo Street
> Mountain View, CA 94043-5203
> Phone : 650.960.4592
> Fax : 650.960.5830
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor



--
http://echorand.me


More information about the Tutor mailing list