[Tutor] Unix Environment variables
Steve Willoughby
steve at alchemy.com
Sun Jun 23 23:48:20 CEST 2013
Note, however, that changing environment variables only affects the environment of your script and it's child processes. Once your script exits, the original shell you called it from is NOT changed.
Sent from my iPad
On 2013/6/23, at 14:35, Amit Saha <amitsaha.in at gmail.com> wrote:
> 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
> _______________________________________________
> Tutor maillist - Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list