Re: access variables from one Python session to another on the same machine?
- From: Larry Bates <larry.bates@xxxxxxxxxxx`>
- Date: Mon, 09 Jun 2008 17:45:57 -0500
Reckoner wrote:
Suppose I have two different command windows going on the same
machine, each running their own Python interpreters.
Is it possible to access the variables in one of the interpreter-
sessions from the other?
It turns out I have limited control over one of the sessions (i.e.
cannot control all the code that is run from there), but complete
control over the other.
I get the feeling this has been asked before, but I'm not sure how to
pose the question in such a way that it would show up on a search.
It's confusing.
Thanks.
IMHO without "significant" access to both programs I believe the answer is no. You would have to introduce something in the master window that would "expose" data to the slave window. Normally this is done via: socket server, pipes, shared database, etc.
Does the master, provide output that could be captured and used as input to the slave? If so, you might be able to use subprocess module to make it work.
-Larry
.
- References:
- Prev by Date: Re: Question by someone coming from C...
- Next by Date: Which Python Wiki engine?
- Previous by thread: access variables from one Python session to another on the same machine?
- Next by thread: Re: access variables from one Python session to another on the same machine?
- Index(es):
Relevant Pages
|