Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #48656

Re: os.putenv() has no effect

References <kpq32r$cdc$1@news.albasani.net>
Date 2013-06-18 13:22 -0500
Subject Re: os.putenv() has no effect
From Skip Montanaro <skip@pobox.com>
Newsgroups comp.lang.python
Message-ID <mailman.3553.1371579771.3114.python-list@python.org> (permalink)

Show all headers | View raw


> Does anybody know why this would happen or what I could be doing wrong?

os.putenv will only affect the environment in subprocesses.  Consider
this session fragment:

% python
Python 2.7.2 (default, Oct 17 2012, 03:11:33)
[GCC 4.4.6 [TWW]] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.putenv("PATH", "/tmp")
>>> os.system("/usr/bin/env")
...
PATH=/tmp
...

Skip

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

os.putenv() has no effect Johannes Bauer <dfnsonfsduifb@gmx.de> - 2013-06-18 18:49 +0200
  Re: os.putenv() has no effect Johannes Bauer <dfnsonfsduifb@gmx.de> - 2013-06-18 19:48 +0200
  Re: os.putenv() has no effect inq1ltd <inq1ltd@inqvista.com> - 2013-06-18 13:24 -0400
  Re: os.putenv() has no effect Dave Angel <davea@davea.name> - 2013-06-18 14:09 -0400
    Re: os.putenv() has no effect Johannes Bauer <dfnsonfsduifb@gmx.de> - 2013-06-18 20:12 +0200
      Re: os.putenv() has no effect Johannes Bauer <dfnsonfsduifb@gmx.de> - 2013-06-18 20:16 +0200
  Re: os.putenv() has no effect Skip Montanaro <skip@pobox.com> - 2013-06-18 13:22 -0500
  Re: os.putenv() has no effect Terry Reedy <tjreedy@udel.edu> - 2013-06-18 16:31 -0400

csiph-web