access variables from one Python session to another on the samemachine?

Discussion in 'Python' started by Reckoner, Jun 9, 2008.

  1. Reckoner

    Reckoner Guest

    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.
     
    Reckoner, Jun 9, 2008
    #1
    1. Advertising

  2. > 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.


    Depending on what 'limited control' means, the simplest choice would
    be writing stuff to a plain text file from the master and reading it
    from the slave. This may or may not work depending on your environment
    though.

    Cheers,
    Daniel
    --
    Psss, psss, put it down! - http://www.cafepress.com/putitdown
     
    Daniel Fetchinson, Jun 10, 2008
    #2
    1. Advertising

  3. Reckoner

    Reckoner Guest

    On Jun 9, 5:23 pm, "Daniel Fetchinson" <>
    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.

    >
    > Depending on what 'limited control' means, the simplest choice would
    > be writing stuff to a plain text file from the master and reading it
    > from the slave. This may or may not work depending on your environment
    > though.
    >
    > Cheers,
    > Daniel
    > --
    > Psss, psss, put it down! -http://www.cafepress.com/putitdown



    This disk-writing approach seems to be simplest & less intrusive.
    Thanks! I'll try it.
     
    Reckoner, Jun 10, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. qwerty
    Replies:
    3
    Views:
    9,289
    Scott Allen
    Sep 30, 2004
  2. loveNUNO
    Replies:
    2
    Views:
    921
    loveNUNO
    Nov 20, 2003
  3. Replies:
    0
    Views:
    830
  4. Guest
    Replies:
    33
    Views:
    728
    Andreas Waldenburger
    Oct 20, 2010
  5. Robert Cohen
    Replies:
    3
    Views:
    275
    Andrew Durstewitz
    Jul 15, 2003
Loading...

Share This Page