[python-win32] How to get all the variables in a python shell

Dahlstrom, Roger rdahlstrom at directedge.com
Thu May 29 07:03:40 EDT 2008


-----Original Message-----
> From: python-win32-bounces at python.org [mailto:python-win32-bounces at python.org] On Behalf Of Tim Golden
> Sent: Thursday, May 29, 2008 4:11 AM
> To: Python-Win32 List; python-list at python.org
> Cc: Python-Win32 List
> Subject: Re: [python-win32] How to get all the variables in a python shell
> 
> lixinyi.23 at gmail.com wrote:
> > I'm currently working on a scientific computation software built in
> > python.
> > What I want to implement is a Matlab style command window <->
> > workspace interaction.
> > 
> > For example, you type 'a=1' in the command window, and you see a list
> > item named 'a' in the workspace.
> > You double click the icon of the item, and you see its value. You can
> > modify the value of the list item,
> > 1 -> 100 etc,  after which if you go back to the command window and
> > type 'a'  and press enter, you see that
> > varable a's value has been changed to 100.
> > 
> > So my question is : if you have two DOS command windows running under
> > WINDOWS OS, how can you make them share the same internal variable
> > buffer? Or is there any easier way to implement such kind of
> > interaction?
> 
> I stronly suggest you look at IPython [1]. To do what I think
> you're describing, you'd need to hack or reimplement the interpreter.
> And that's what they've done. ISTR that they even have a branch
> which is dealing with parallel instances.
> 
> TJG
> 
> [1] http://ipython.scipy.org/moin/
> _______________________________________________
> python-win32 mailing list
> python-win32 at python.org
> http://mail.python.org/mailman/listinfo/python-win32


I'd try looking at memcached (http://www.danga.com/memcached/apis.html).  No hacking or reimplementation of the interpreter would be necessary, and there's a
Python api available.  I haven't used it for anything production related, but I have played with it a bit, and it's fast and stable.



DISCLAIMER:
This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and
may contain legally privileged and/or confidential information. If you are not the intended recipient
of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail, and 
any attachments thereto, is strictly prohibited. If you have received this in error, please immediately notify 
me and permanently delete the original and any copy of any e-mail and any printout thereof. 
E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept 
liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission.

NOTICE REGARDING PRIVACY AND CONFIDENTIALITY
Direct Edge ECN LLC may, at its discretion, monitor and review the content of all e-mail communications.

www.directedge.com



More information about the Python-list mailing list