Re: Environment variables not visible from Python

2011-09-22 Thread Peter Pearson
On Thu, 22 Sep 2011 09:21:59 +0200, Thomas Rachel wrote: [snip] > $ python -c 'import os; print "\n".join(sorted("%s=%s" % (k,v) for k,v > in os.environ.iteritems()))' | diff -u - <(env|LANG=C sort) [standing ovation] -- To email me, substitute nowhere->spamcop, invalid->net. -- http://mail.py

Re: Environment variables not visible from Python

2011-09-22 Thread Ben Finney
Thomas Rachel writes: > Am 22.09.2011 12:16 schrieb Ben Finney: > > -- > > \ “As far as the laws of mathematics refer to reality, they are | > >`\not certain, and as far as they are certain, they do not refer | > > _o__) to reality.” —Albert Einstein, 1

Re: Environment variables not visible from Python

2011-09-22 Thread Thomas Rachel
Am 22.09.2011 12:16 schrieb Ben Finney: -- \ “As far as the laws of mathematics refer to reality, they are | `\not certain, and as far as they are certain, they do not refer | _o__) to reality.” —Albert Einstein, 1983 | Ben Finney So, he said what in

Re: Environment variables not visible from Python

2011-09-22 Thread Steven D'Aprano
Ben Finney wrote: > Steven D'Aprano writes: > >> I don't understand why some environment variables are not visible from >> Python. > > Not all variables are environment variables. Variables only become > environment variables if exported to the environment; the ‘export’ > command is one way to

Re: Environment variables not visible from Python

2011-09-22 Thread Ben Finney
Steven D'Aprano writes: > I don't understand why some environment variables are not visible from > Python. Not all variables are environment variables. Variables only become environment variables if exported to the environment; the ‘export’ command is one way to do that. -- \ “As far a

Re: Environment variables not visible from Python

2011-09-22 Thread Thomas Rachel
Am 22.09.2011 08:12 schrieb Steven D'Aprano: I don't understand why some environment variables are not visible from Python. [steve@wow-wow ~]$ echo $LINES $COLUMNS $TERM 30 140 xterm [steve@wow-wow ~]$ python2.6 Python 2.6.6 (r266:84292, Dec 21 2010, 18:12:50) [GCC 4.1.2 20070925 (Red Hat 4.1.2-

Re: Environment variables not visible from Python

2011-09-21 Thread Hegedüs , Ervin
hello, On Thu, Sep 22, 2011 at 06:12:01AM +, Steven D'Aprano wrote: > I don't understand why some environment variables are not visible from > Python. > > [steve@wow-wow ~]$ echo $LINES $COLUMNS $TERM > 30 140 xterm > [steve@wow-wow ~]$ python2.6 > Python 2.6.6 (r266:84292, Dec 21 2010, 18:1

Re: Environment variables not visible from Python

2011-09-21 Thread Kushal Kumaran
On Thu, Sep 22, 2011 at 11:42 AM, Steven D'Aprano wrote: > I don't understand why some environment variables are not visible from > Python. > > [steve@wow-wow ~]$ echo $LINES $COLUMNS $TERM > 30 140 xterm > [steve@wow-wow ~]$ python2.6 > Python 2.6.6 (r266:84292, Dec 21 2010, 18:12:50) > [GCC 4.1.

Re: Environment Variables

2008-04-25 Thread Mike Driscoll
On Apr 25, 8:26 am, Krishna <[EMAIL PROTECTED]> wrote: > On Apr 25, 9:17 am, Mike Driscoll <[EMAIL PROTECTED]> wrote: > > > > > On Apr 25, 8:07 am, Krishna <[EMAIL PROTECTED]> wrote: > > > > Environment variable set up is the most confusing part for me all the > > > time. Please help me with the fo

Re: Environment Variables

2008-04-25 Thread Krishna
On Apr 25, 9:17 am, Mike Driscoll <[EMAIL PROTECTED]> wrote: > On Apr 25, 8:07 am, Krishna <[EMAIL PROTECTED]> wrote: > > > > > > > Environment variable set up is the most confusing part for me all the > > time. Please help me with the following questions: > > > When I install python in a new syste

Re: Environment Variables

2008-04-25 Thread Steve Holden
Krishna wrote: Environment variable set up is the most confusing part for me all the time. Please help me with the following questions: When I install python in a new system, I will go to environment variables (system variables) and set "path" pointing to C:\Python25 and thats all I do. I type p

Re: Environment Variables

2008-04-25 Thread Mike Driscoll
On Apr 25, 8:07 am, Krishna <[EMAIL PROTECTED]> wrote: > Environment variable set up is the most confusing part for me all the > time. Please help me with the following questions: > > When I install python in a new system, I will go to environment > variables (system variables) and set "path" point

Re: Environment Variables

2007-11-17 Thread James Stroud
Wang, Harry wrote: > Need some suggestions as to how to set environment variable in Windows XP. os.environ['SUX'] = 'windowsxp' > Got XML which has a timestamp in Eastern Standard time, but would like to > strip it out for comparison with expected result. Example? -- James Stroud UCLA-DOE In