Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > interactive prompts

Reply
Thread Tools

interactive prompts

 
 
Michael Williams
Guest
Posts: n/a
 
      11-27-2005
Hi all,

I'm having an issue with environment variables and spawned commands.
Specifically, I'm using "eval `ssh-agent`" and "ssh-add". My
question is, 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?

Regards,
Michael
 
Reply With Quote
 
 
 
 
Ben Finney
Guest
Posts: n/a
 
      11-27-2005
Michael Williams <> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox 1.0.4 and open command box prompts? MrRx Firefox 3 05-18-2005 12:46 AM
Interactive/Non-interactive ASPX ? WJ ASP .Net 2 02-26-2005 02:54 AM
non Interactive and Interactive AAH Computer Support 0 01-09-2005 04:09 PM
Interactive and non interactive AAH Computer Support 1 01-09-2005 04:01 PM
Windows Installer prompts on each launch of application Thomas Weise ASP .Net 1 11-15-2004 04:35 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57