473,320 Members | 1,922 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

interactive prompts

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
Nov 27 '05 #1
1 1188
Michael Williams <mw*******@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
Nov 27 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Avi Berkovich | last post by:
Hello, I was unable to use popen2.popen4 to grab python.exe's (2.3) output, for starts, it doesn't show the version information at the beginning and won't return anything when writing to the...
15
by: Ashot | last post by:
This is sort of both Python and Vim related (which is why I've posted to both newsgroups). Python related: ---------------------- I have been frustrated for quite some time with a lack of a...
1
by: Alex | last post by:
Loking at Rossum's tutorial I've seen that he sometimes uses the expression "interactive mode" and sometimes "calculator mode". Or these concepts same? I've made the following assertion. ...
7
by: Bo Peng | last post by:
Dear list, I have a long list of commands in the form of a script and would like to obtain a log file as if I enter the commands one by one. (The output will be used in a tutorial.) What would...
2
by: planetthoughtful | last post by:
Hello All, Newbie to Python, and I'm wondering if it's possible to create a Python console app that prompts for further input on the command line when run (in Windows XP, if that's important)? ...
2
by: Vinny | last post by:
I'm writing a small ASP program which prompts the user for data. I would like to interactively validate the data as they are entering it, rather than waiting until they submit the form. So, I am...
2
by: Tim Chase | last post by:
A couple of hopefully short (interrelated) questions: 1) is there a way to suppress the banner when starting Python interactively? Something like a "--quiet" that would just drop you straight...
1
by: recioss | last post by:
CODE] represent a time amount measured in hours, minutes, and seconds and then prints the equivalent time in seconds. Use three lines for input and one linf for output. The user's responsers should...
0
by: Jan Kanis | last post by:
Hello everyone, I'm trying to change the interactive python prompt. According to the docs this is done by changing sys.ps1 and sys.ps2 . That works fine when running python interactively from a...
0
by: Berend van Berkum | last post by:
Hi all, I'm looking at building an interactive session in front of some rdfobj instances. I've used cmd and just found code.Interactive*. Protocol doesn't matter, I'm looking at the UI...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.