Re: Meaning of "Add Python to environment variables"

2017-12-08 Thread Thomas Jollans
On 03/12/17 18:32, John Yeung wrote: > In the custom installation options for Python 3.6, what *exactly* does "Add Python to environment variables" mean? > > Which environment variables are we talking about? I imagine one of them would have to be PATH. Are there any others?

Re: Meaning of "Add Python to environment variables"

2017-12-03 Thread Thomas Jollans
On 03/12/17 18:32, John Yeung wrote: > In the custom installation options for Python 3.6, what *exactly* does "Add > Python to environment variables" mean? > > Which environment variables are we talking about? I imagine one of them would > have to be PATH. Are there any

Meaning of "Add Python to environment variables"

2017-12-03 Thread John Yeung
In the custom installation options for Python 3.6, what *exactly* does "Add Python to environment variables" mean? Which environment variables are we talking about? I imagine one of them would have to be PATH. Are there any others? John Y. -- https://mail.python.org/mailman/listi

Re: Settig some environment variables from within python.

2016-03-23 Thread Terry Reedy
On 3/23/2016 5:33 AM, Hongyi Zhao wrote: Hi all, I want to submit a qsub job to my hpc cluster from within python. In this case, I must set some environment variables specific for this qsub job and then invoking a bash script from within python. What python code should be used for this job

Settig some environment variables from within python.

2016-03-23 Thread Hongyi Zhao
Hi all, I want to submit a qsub job to my hpc cluster from within python. In this case, I must set some environment variables specific for this qsub job and then invoking a bash script from within python. What python code should be used for this job? Regards -- .: Hongyi Zhao [ hongyi.zhao

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;

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. --

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

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

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

Environment variables not visible from Python

2011-09-21 Thread 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-27)] on linux2 Type "help&qu

Re: How to capture all the environment variables from shell?

2010-08-11 Thread Cameron Simpson
On 12Aug2010 01:28, Nobody wrote: | On Wed, 11 Aug 2010 13:08:59 +1000, Cameron Simpson wrote: | > The reason .bashrc gets overused for envars, aside from ignorance and | > propagated bad habits, is that in a GUI desktop the setup sequence is | > often a bit backwards. A conventional terminal/cons

Re: How to capture all the environment variables from shell?

2010-08-11 Thread Nobody
On Wed, 11 Aug 2010 13:08:59 +1000, Cameron Simpson wrote: > The reason .bashrc gets overused for envars, aside from ignorance and > propagated bad habits, is that in a GUI desktop the setup sequence is > often a bit backwards. A conventional terminal/console login means you > get a login shell th

Re: How to capture all the environment variables from shell?

2010-08-10 Thread Cameron Simpson
On 11Aug2010 13:08, I wrote: | On 10Aug2010 10:07, Steven W. Orr wrote: [...] | | After that, and again, be aware that the .bashrc alone is executed for login | | shells *which are not interactive*. for example: | | | | ssh somemachine 'echo Hello' | | | | This command will *not* go through the

Re: How to capture all the environment variables from shell?

2010-08-10 Thread Cameron Simpson
e | > empty (except a source statement for .bashrc) and put all your settings, | > aliases, exports, etc. in .bashrc. | | Sorry. Dead wrong. Please reread the above comment I wrote. If you set your | environment variables in the .bashrc then you completely lose the ability of | env

Re: How to capture all the environment variables from shell?

2010-08-10 Thread Steven W. Orr
ttings, > aliases, exports, etc. in .bashrc. > > Thorsten Sorry. Dead wrong. Please reread the above comment I wrote. If you set your environment variables in the .bashrc then you completely lose the ability of environment variables to be inherited by sub-shells. Again, envvars should

Re: How to capture all the environment variables from shell?

2010-08-02 Thread Thorsten Kampe
* Tim Chase (Mon, 26 Jul 2010 21:42:24 -0500) > On 07/26/10 21:26, Steven W. Orr wrote: > > Please! Never export anything from your .bashrc unless you > > really know what you're doing. Almost all exports should be > > done in your .bash_profile > > Could you elaborate on your reasoning why (or wh

Re: How to capture all the environment variables from shell?

2010-07-27 Thread Steven W. Orr
On 07/26/10 22:42, quoth Tim Chase: > On 07/26/10 21:26, Steven W. Orr wrote: >> Please! Never export anything from your .bashrc unless you >> really know what you're doing. Almost all exports should be >> done in your .bash_profile > > Could you elaborate on your reasoning why (or why-not)? I've

Re: How to capture all the environment variables from shell?

2010-07-27 Thread Nobody
tings. But it only works for shells (and only for bash shells, and only for interactive bash shells), while your environment settings should be available to everything, regardless of whether it was spawned from an interactive bash shell or from some other program. Also, if you update environment v

Re: How to capture all the environment variables from shell?

2010-07-26 Thread Steven D'Aprano
On Mon, 26 Jul 2010 22:26:27 -0400, Steven W. Orr wrote: > Please! Never export anything from your .bashrc unless you really know > what you're doing. Almost all exports should be done in your > .bash_profile Would you like to explain why, or should we just trust you? -- Steven -- http://mail

Re: How to capture all the environment variables from shell?

2010-07-26 Thread Tim Chase
On 07/26/10 21:26, Steven W. Orr wrote: Please! Never export anything from your .bashrc unless you really know what you're doing. Almost all exports should be done in your .bash_profile Could you elaborate on your reasoning why (or why-not)? I've found that my .bash_profile doesn't get evalua

Re: How to capture all the environment variables from shell?

2010-07-26 Thread Steven W. Orr
On 07/26/10 20:02, quoth Chris Rebert: > On Mon, Jul 26, 2010 at 4:36 PM, Peng Yu wrote: > > You need to "export R_HOME" in bash (probably in your .bashrc or > .bash_profile). See > http://www.ibm.com/developerworks/library/l-bash.html#N10074 Please! Never export anything from your .bashrc unles

Re: How to capture all the environment variables from shell?

2010-07-26 Thread Cameron Simpson
now what is the correct way to inherent | all the environment variables form the shell? | | $ echo $R_HOME | /opt/R-2.11.1 | $ cat main.py | #!/usr/bin/env python | | import os | | print os.environ['R_HOME'] | $ ./main.py | Traceback (most recent call last): | File "./main.py",

Re: How to capture all the environment variables from shell?

2010-07-26 Thread Rhodri James
me know what is the correct way to inherent all the environment variables form the shell? os.environ does capture all the environment that the shell passes to it. In this case, you haven't exported R_HOME, so the shell doesn't export it, so os.environ has no chance to capture it. rho..

Re: How to capture all the environment variables from shell?

2010-07-26 Thread Chris Rebert
> shell. Could anybody let me know what is the correct way to inherent > all the environment variables form the shell? > > $ echo $R_HOME > /opt/R-2.11.1 > $ cat main.py > #!/usr/bin/env python > > import os > > print os.environ['R_HOME'] > $ ./

How to capture all the environment variables from shell?

2010-07-26 Thread Peng Yu
Hi, R_HOME is set in my shell (bash). But os.environ doesn't have it. I'm not sure what it does when os module is imported. But it seems that os.environ doesn't capture all the environment variable from the shell. Could anybody let me know what is the correct way to inherent all

Re: Problem with environment variables and cx_Oracle

2009-02-24 Thread Zvezdan Petkovic
On Feb 24, 2009, at 4:34 PM, Brandon Taylor wrote: Here's my setup: OS X (10.5.6 - Intel), Oracle Instant Clinet 10_2, Python 2.6.1, Django trunk OS X is an important detail here. In my .bash_profile, I have ORACLE_HOME and LD_LIBRARY_PATH specified as: ORACLE_HOME="$HOME/Library/Oracle/inst

Problem with environment variables and cx_Oracle

2009-02-24 Thread Brandon Taylor
Hello everyone, Here's my setup: OS X (10.5.6 - Intel), Oracle Instant Clinet 10_2, Python 2.6.1, Django trunk I have my Oracle instantclient folder at: /Users/bft228/Library/Oracle/ instantclient_10_2 In my .bash_profile, I have ORACLE_HOME and LD_LIBRARY_PATH specified as: ORACLE_HOME="$HOME/

Re: Adding environment variables to bash.

2008-09-11 Thread Craig Allen
On Sep 11, 10:25 am, nntpman68 <[EMAIL PROTECTED]> wrote: > >> doesn't exactly work for Python scripts, though: > > >> $ cat env.py > >> #!/usr/bin/env python > >> import os > >> os.environ["TEST"] = "hello" > > >> $ . ./env.py && env | grep TEST > >> import: unable to open X server `'. > >> bash:

Re: Adding environment variables to bash.

2008-09-11 Thread nntpman68
doesn't exactly work for Python scripts, though: $ cat env.py #!/usr/bin/env python import os os.environ["TEST"] = "hello" $ . ./env.py && env | grep TEST import: unable to open X server `'. bash: os.environ[TEST]: command not found There's two options for the desperate ones. 1. Assumin

Re: Adding environment variables to bash.

2008-09-11 Thread John Lawrence
> > doesn't exactly work for Python scripts, though: > True, but you can use it in the following (admittedly messy) way: jl> cat setenv.sh /usr/bin/env python $@ . ./settmp rm settmp jl> cat env.py #!/usr/bin/python command = "export TEST='hello'\n" open('settmp', 'w').write(command) jl> . sete

Re: Adding environment variables to bash.

2008-09-11 Thread Fredrik Lundh
John Lawrence wrote: You can make a command use the current shell though if you use the '.' command e.g.: jl > cat env.sh export TEST='hello' jl > ./env.sh && env | grep TEST #Doesn't set TEST in parent shell jl > . ./env.sh && env | grep TEST #Adding '. ' before the comman

Re: Adding environment variables to bash.

2008-09-11 Thread John Lawrence
> > when a process starts, it gets a *copy* of the parent's environment. it > can modify that copy, but it cannot modify the variables in the parent. You can make a command use the current shell though if you use the '.' command e.g.: jl > cat env.sh export TEST='hello' jl > ./env.sh && env |

Re: Adding environment variables to bash.

2008-09-11 Thread Fredrik Lundh
aditya shukla wrote: Can i add any environment variable to bash from my python script? so that when i use env command then i can see that environment variable. not if you run the script from the shell. when a process starts, it gets a *copy* of the parent's environment. it can modify that c

Adding environment variables to bash.

2008-09-11 Thread aditya shukla
Hello folks Can i add any environment variable to bash from my python script? so that when i use env command then i can see that environment variable. Thanks Aditya -- http://mail.python.org/mailman/listinfo/python-list

Re: Working with environment variables.

2008-09-10 Thread Christian Heimes
aditya shukla wrote: now this dosen't change the value of the variable which was set earlier .Please help me in fixing this issue. Are you trying to modify or add an environment var so the change is visible from the calling shell? That's not possible. You can't change the env var of a parent

Working with environment variables.

2008-09-10 Thread aditya shukla
Hello folks, i am working with Python-2.5.2, fedora 9 sulphur I wanna change the value of environment variable , so if i open bash and type envvariable=value;export variable then this sets the envvariable equal to the value.Now i am writing a python script to set the value of this environment v

Re: Creating environment variables.

2008-08-27 Thread Fredrik Lundh
to read it: path = os.environ["MYVARIABLE"] > Also how do i create environment variable for prog1? that depends on what platform (and shell) you're using. on Windows, you can set environment variables via the SET command, or, permanently, via the control panel (

Environment variables

2008-08-26 Thread aditya shukla
Hello folks, How can i create environment variables using python? Aditya -- http://mail.python.org/mailman/listinfo/python-list

Creating environment variables.

2008-08-26 Thread aditya shukla
Hello folks, I am writing a program(prog 1) in python , which requires to know the path of another program(prog 2) in order to execute.I can get my prog1 to work when i hard code the path of the existing program(prog2).But since the path of prog could be anywhere on the file system , thus i cannot

Re: unified command line args, environment variables, .conf file settings.

2008-05-07 Thread andrej . panjkov
nding this to include other sources of control inputs. I think a reasonable heirarchy is: Interactive Input > Command Line Argument > Command Line Input File > Environment Variables > Local Defaults File > System Wide Defaults File > Installation Default

Re: unified command line args, environment variables, .conf file settings.

2008-05-03 Thread smitty1e
_db': 'test_env'} > > [EMAIL PROTECTED] ~/proj/mddl4/test $ ./inputs.py -f "test_cli" > > {'source_db': 'test_cli'} > > A good start. However, you need to account for two conventions with > configuration of programs via enviro

Re: unified command line args, environment variables, .conf file settings.

2008-05-02 Thread Ben Finney
> {'source_db': 'test_cli'} A good start. However, you need to account for two conventions with configuration of programs via environment variables: * Environment variables that will be inherited by subprocesses are conventionally distinguished from variables that will not

unified command line args, environment variables, .conf file settings.

2008-05-02 Thread smitty1e
ome.db'} [EMAIL PROTECTED] ~/proj/mddl4/test $ source_db="test_env" ./inputs.py {'source_db': 'test_env'} [EMAIL PROTECTED] ~/proj/mddl4/test $ ./inputs.py -f "test_cli" {'source_db': 'test_cli'} For the file = #!/usr/bin/env python

Re: Environment Variables

2008-04-25 Thread Mike Driscoll
r 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. > >

Re: Environment Variables

2008-04-25 Thread Krishna
ions: > > > 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 python from "cmd" window and its converting to python window > >

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

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 var

Environment Variables

2008-04-25 Thread Krishna
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 python

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

Environment Variables

2007-11-17 Thread Wang, Harry
Need some suggestions as to how to set environment variable in Windows XP. Got XML which has a timestamp in Eastern Standard time, but would like to strip it out for comparison with expected result. Harry C. Wang Automated Tester AOL Mobile -- http://mail.python.org/mailman/listinfo/python-l

Re: programmatically manipulation environment variables of the calling shell

2007-03-12 Thread Diez B. Roggisch
ub process of bash). >> > "calling shell"... Only OS I've encountered that allowed for a form > of that was AmigaOS, which differentiated between "shell specific" > (local) environment variables: > > set lev "A Local Environment Variable"

Re: programmatically manipulation environment variables of the calling shell

2007-03-12 Thread Diez B. Roggisch
Michal 'vorner' Vaner wrote: > Hello, > > On Mon, Mar 12, 2007 at 11:40:11AM +0100, Diez B. Roggisch wrote: >> Maxim Veksler wrote: >> > I'm trying to write a python script that would allow me to manipulate >> > shell variables of the calling shell. I'm trying to write some logic >> > that would

Re: programmatically manipulation environment variables of the calling shell

2007-03-12 Thread Michal 'vorner' Vaner
Hello, On Mon, Mar 12, 2007 at 11:40:11AM +0100, Diez B. Roggisch wrote: > Maxim Veksler wrote: > > I'm trying to write a python script that would allow me to manipulate > > shell variables of the calling shell. I'm trying to write some logic > > that would know to add LD_LIBRARY_PATH to the users

Re: programmatically manipulation environment variables of the calling shell

2007-03-12 Thread Maxim Veksler
ank you, > > Maxim. > This is not possible to do directly. > There is however a possibility to solve this problem under special > circumstances. > 1. Your python (/perl/shell/etc) script must write the wanted > environment > variables to standard ou

Re: programmatically manipulation environment variables of the calling shell

2007-03-12 Thread Tommy Nordgren
m under special circumstances. 1. Your python (/perl/shell/etc) script must write the wanted environment variables to standard out, as key-value pairs with a suitable separator. 2. The invoking shell must agree with your script as to what separator is used. 3. In

Re: programmatically manipulation environment variables of the calling shell

2007-03-12 Thread Gerard Flanagan
ARY_PATH to the users environment. > > In bash this is done with "export", can I do this with python? (If at > all possible because python is actually a sub process of bash). > The Popen class from the subprocess module takes an optional 'env' parameter, which defi

Re: programmatically manipulation environment variables of the calling shell

2007-03-12 Thread Diez B. Roggisch
Maxim Veksler wrote: > Hello list, > > I'm trying to write a python script that would allow me to manipulate > shell variables of the calling shell. I'm trying to write some logic > that would know to add LD_LIBRARY_PATH to the users environment. > > In bash this is done with "export", can I do

programmatically manipulation environment variables of the calling shell

2007-03-12 Thread Maxim Veksler
Hello list, I'm trying to write a python script that would allow me to manipulate shell variables of the calling shell. I'm trying to write some logic that would know to add LD_LIBRARY_PATH to the users environment. In bash this is done with "export", can I do this with python? (If at all possibl

Re: resolve environment variables in string - regular expression

2007-02-09 Thread Paul McGuire
On Feb 9, 6:47 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On 9 fév, 12:30, "Kai Rosenthal" <[EMAIL PROTECTED]> wrote: > > > Hello, > > > how can I resolve envionment variables in a string. > > e.g. > > > strVar = /myVar > > resolve in > > nothing. This raises a SyntaxError. Python is *not

Re: resolve environment variables in string - regular expression

2007-02-09 Thread [EMAIL PROTECTED]
On 9 fév, 12:30, "Kai Rosenthal" <[EMAIL PROTECTED]> wrote: > Hello, > > how can I resolve envionment variables in a string. > e.g. > > strVar = /myVar > resolve in nothing. This raises a SyntaxError. Python is *not* a shell script language. > str1 = /mytest02/$MYVAR/mytest02 --> /mytest02//m

resolve environment variables in string - regular expression

2007-02-09 Thread Kai Rosenthal
Hello, how can I resolve envionment variables in a string. e.g. strVar = /myVar resolve in str1 = /mytest02/$MYVAR/mytest02 --> /mytest02//myVar/mytest02 (unix) str2 =$MYVAR/mytest03 --> /myVar/mytest03 (unix) str3 =%MYVAR%/mytest03 --> /myVar/mytest03 (windows) I would not set the va

Re: IDLE Python and Environment Variables

2007-01-11 Thread Gabriel Genellina
At Thursday 11/1/2007 11:45, Tristan wrote: I considered to use it, thanks!! Incidentally (beg your pardon if it sounds to ignorance), can I define Environment variables in a config file and then apply to my python program? Yes, read them from the config file and then use os.environ['

Re: IDLE Python and Environment Variables

2007-01-11 Thread Tristan
Thanks Gabriel. > What kind of environment variables? Those used by Python itself, like > PYTHONPATH? Or your own variables, like FOO_LOCATION=C:\My\Projects\Lib\Foo I need to add to PYTHONPATH and other enviroment variables asked, for example, by DJANGO or other python products. > I

Re: IDLE Python and Environment Variables

2007-01-10 Thread Gabriel Genellina
At Wednesday 10/1/2007 23:24, Tristan wrote: 1) For almost everyone, I execute a corresponding ".bat file" into which I define and/or include values for some "temporal" environment variables that let me find all the objects that the selected application uses. Someti

IDLE Python and Environment Variables

2007-01-10 Thread Tristan
to use these applications is: 1) For almost everyone, I execute a corresponding ".bat file" into which I define and/or include values for some "temporal" environment variables that let me find all the objects that the selected application uses. Sometimes I include

IDLE Python and Environment Variables

2007-01-10 Thread Tristan
to use these applications is: 1) For almost everyone, I execute a corresponding ".bat file" into which I define and/or include values for some "temporal" environment variables that let me find all the objects that the selected application uses. Sometimes I include

A question about IDLE and environment variables

2007-01-09 Thread Tristan
to use these applications is: 1) For almost everyone, I execute a corresponding ".bat file" into which I define and/or include values for some "temporal" environment variables that let me find all the objects that the selected application uses. Sometimes I include in the .ba

Re: Setting environment variables for tcsh session

2005-07-22 Thread Dan Sommers
On Fri, 22 Jul 2005 10:56:22 -0500, David Durkee <[EMAIL PROTECTED]> wrote: > I didn't get much from the discussion of Command Substitution. Any tips > on how to do that? I don't use tcsh, so there may be some subtleties I don't get, but it's going to look something like this: c

Re: Setting environment variables for tcsh session

2005-07-22 Thread David Durkee
to write a script I can run from tcsh in Terminal (on Mac >> OS X) that will set environment variables that can be accessed by >> subsequent commands I execute in that session. Not having any luck so >> far. Here's what I've tried: >> >> > > By desi

Re: Setting environment variables for tcsh session

2005-07-21 Thread Dan Sommers
On Thu, 21 Jul 2005 21:39:01 -0500, David Durkee <[EMAIL PROTECTED]> wrote: > I'm trying to write a script I can run from tcsh in Terminal (on Mac > OS X) that will set environment variables that can be accessed by > subsequent commands I execute in that session. Not havi

Setting environment variables for tcsh session

2005-07-21 Thread David Durkee
Hi, I'm trying to write a script I can run from tcsh in Terminal (on Mac OS X) that will set environment variables that can be accessed by subsequent commands I execute in that session. Not having any luck so far. Here's what I've tried: #!/usr/bin/python import sys

Re: Is it possible to distinguish between system environment variables and the user ones?

2005-04-05 Thread Kartic
There is nothing that plainly differentiates whether an environment variable is the system's or the current user's. What you could do is: 1. Get the list of environment variables for the user the script is executing as. 2. Use the pywin32 extensions to access the registry key HKCU\Env

Re: Is it possible to distinguish between system environment variables and the user ones?

2005-04-05 Thread Peter Hansen
could ildg wrote: > To a environment variable in Windows, can python know if it is a > system environment > variable or a current-user environment variable? Not just by using the "os.environ" approach. You would have to resort to the "pywin32" extensions. Check the Python Cookbook using Google fo

Is it possible to distinguish between system environment variables and the user ones?

2005-04-05 Thread could ildg
To a environment variable in Windows, can python know if it is a system environment variable or a current-user environment variable? -- 鹦鹉聪明绝顶、搞笑之极,是人类的好朋友。 直到有一天,我才发觉,我是鹦鹉。 我是翻墙的鹦鹉。 -- http://mail.python.org/mailman/listinfo/python-list