Re: access variables from one Python session to another on the same machine?



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
.



Relevant Pages

  • Re: sessions and back button
    ... > I am developing a web site with a section only for registered users and ... > using sessions to control the access to these pages. ... > "page expired" and mozilla displaying the advise that you are trying to ...
    (comp.lang.php)
  • Re: Include IE in DLL ...
    ... but I can't create a new instance of IE that shares the sessions ... "Igor Tandetnik" wrote in message ... >> session states across multiple windows I need to include IE in a DLL. ... > Just create a hidden window that hosts WebBrowser ActiveX control, ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: sessions and back button
    ... I am developing a web site with a section only for registered users and ... using sessions to control the access to these pages. ... "page expired" and mozilla displaying the advise that you are trying to ...
    (comp.lang.php)
  • sessions and back button
    ... I am developing a web site with a section only for registered users and ... using sessions to control the access to these pages. ... "page expired" and mozilla displaying the advise that you are trying to ...
    (comp.lang.php)