Re: environment variable

2017-06-24 Thread Cameron Simpson
On 24Jun2017 21:31, Gene Heskett wrote: On Saturday 24 June 2017 21:03:18 Steve D'Aprano wrote: On Sun, 25 Jun 2017 08:39 am, Gene Heskett wrote: > On Saturday 24 June 2017 16:49:25 Smith wrote: >> Hello to all, >> I wanted to ask you how I could delete a line of an environment >> variable (PAT

Re: environment variable

2017-06-24 Thread Gene Heskett
On Saturday 24 June 2017 21:03:18 Steve D'Aprano wrote: > On Sun, 25 Jun 2017 08:39 am, Gene Heskett wrote: > > On Saturday 24 June 2017 16:49:25 Smith wrote: > >> Hello to all, > >> I wanted to ask you how I could delete a line of an environment > >> variable (PATH) > > [...] > > > export PATH= >

Re: environment variable

2017-06-24 Thread Steve D'Aprano
On Sun, 25 Jun 2017 08:39 am, Gene Heskett wrote: > On Saturday 24 June 2017 16:49:25 Smith wrote: > >> Hello to all, >> I wanted to ask you how I could delete a line of an environment >> variable (PATH) [...] > export PATH= > > but be prepared to type the full path to anything you want to run.

Re: environment variable

2017-06-24 Thread Gene Heskett
On Saturday 24 June 2017 16:49:25 Smith wrote: > Hello to all, > I wanted to ask you how I could delete a line of an environment > variable (PATH) > > ~/Scaricati/pycharm-2017.1.4/bin$ echo $PATH | sed s/:/'\n'/g > /usr/local/sbin > /usr/local/bin > /usr/sbin > /usr/bin > /sbin > /bin > /usr/games

Re: environment variable

2017-06-24 Thread Michael F. Stemper
On 2017-06-24 15:49, Smith wrote: Hello to all, I wanted to ask you how I could delete a line of an environment variable (PATH) ~/Scaricati/pycharm-2017.1.4/bin$ echo $PATH | sed s/:/'\n'/g /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/local/games /snap/bin /path

Re: ENVIRONMENT Variable expansion in ConfigParser

2010-10-14 Thread Rodrick Brown
How about doing something like host.name=%HOSTNAME% Then when you parse in the value %HOSTNAME% from your configParser module you do a pattern substitution of %HOSTNAME% with os.environ['HOSTNAME']. Sent from my iPhone 4. On Oct 14, 2010, at 7:57 PM, pikespeak wrote: > Hi, > I am using Conf

Re: Environment Variable

2005-07-18 Thread Raymond Hettinger
[Vivek Chaudhary] > Is it possible to set an environment variable in python script whose > value is retained even after the script exits. There is an indirect approach: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/159462 Raymond -- http://mail.python.org/mailman/listinfo/python-l

Re: Environment Variable

2005-07-17 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Sybren Stuvel <[EMAIL PROTECTED]> wrote: >tuxlover enlightened us with: >> No, the replies from Grant's and Sybren's do answer my question. > >It would be a lot more polite to actually thank the people helping >you. .

Re: Environment Variable

2005-07-12 Thread Sybren Stuvel
tuxlover enlightened us with: > No, the replies from Grant's and Sybren's do answer my question. It would be a lot more polite to actually thank the people helping you. Sybren -- The problem with the world is stupidity. Not saying there should be a capital punishment for stupidity, but why don't

Re: Environment Variable

2005-07-12 Thread tuxlover
No, the replies from Grant's and Sybren's do answer my question. I posted twice because my browser locked itself up, and I ended up typing twice :( -- http://mail.python.org/mailman/listinfo/python-list

Re: Environment Variable

2005-07-11 Thread Reinhold Birkenfeld
[EMAIL PROTECTED] wrote: > Sorry for posting twice. > Sorry for forgetting my . Reinhold -- http://mail.python.org/mailman/listinfo/python-list

Re: Environment Variable

2005-07-11 Thread tuxlover
Sorry for posting twice. -- http://mail.python.org/mailman/listinfo/python-list

Re: Environment Variable

2005-07-11 Thread Reinhold Birkenfeld
[EMAIL PROTECTED] wrote: > Is it possible to set an environment variable from inside the python > script which will be retained after the script exits. > > If I use the following code: > > import os > os.putvar("name", "tuxlover") > > the enivironment variable name is visible to only the sub-pro

Re: Environment Variable

2005-07-11 Thread Sybren Stuvel
Vivek Chaudhary enlightened us with: > Is it possible to set an environment variable in python script whose > value is retained even after the script exits. It is, if you have absolute control over the calling environment. > Is it possible to somehow create this environment variable inside > pyth

Re: Environment Variable

2005-07-11 Thread Grant Edwards
On 2005-07-11, Vivek Chaudhary <[EMAIL PROTECTED]> wrote: > Is it possible to set an environment variable in python script whose > value is retained even after the script exits. No, not in Unix/Linux. In VMS I think there is. -- Grant Edwards grante Yow! I thin