interactive prompts

Ben Finney bignose+hates-spam at benfinney.id.au
Sun Nov 27 05:06:41 EST 2005


Michael Williams <mwilliams at mgreg.com> wrote:
> how do I force the environmental variables set by one  'popen' or
> 'pexpect' to propagate throughout the entire Python  session so that
> any commands called will see those env variables?

A process's environment must be inherited from its parent, or set by
the process itself. Child processes can't affect their parent
process's environment. (This is the way it works in Unix, it's not
specific to Python.)

-- 
 \      "A society that will trade a little liberty for a little order |
  `\    will lose both, and deserve neither."  -- Thomas Jefferson, in |
_o__)                                              a letter to Madison |
Ben Finney



More information about the Python-list mailing list