Re: How to get all the variables in a python shell

2008-06-01 Thread Lie
On May 29, 1:47 pm, [EMAIL PROTECTED] wrote: > Hi! > > 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 > i

Re: How to get all the variables in a python shell

2008-06-01 Thread Lie
On Jun 2, 1:29 am, Lie <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi! > > > 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' i

Re: How to get all the variables in a python shell

2008-06-01 Thread Lie
[EMAIL PROTECTED] wrote: > Hi! > > 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

Re: How to get all the variables in a python shell

2008-05-31 Thread Alan J. Salmoni
I'm not certain if this is what you want but try this for the first window: import __main__ localvars = __main__.__dict__ dir(localvars) # lists names of all objects available to the interpreter. And then you can pass localvars anywhere in the program - so after a command is entered in one window

Re: How to get all the variables in a python shell

2008-05-31 Thread caca
Have you seen this page? http://matplotlib.sourceforge.net/screenshots.html On watching this, I wouldn't say matplotlib is inferior to matlab plotting. Also, I don't know what they use in sage, but they have 3D plots of surfaces that you can rotate with the mouse. Do as you like, but if

Re: How to get all the variables in a python shell

2008-05-31 Thread caca
I meant it prints 4, which means the value of test is modified by the access to the dict > test=5 > __IPYTHON__.user_ns['test']=4 > print test #prints 4 > -- http://mail.python.org/mailman/listinfo/python-list

RE: How to get all the variables in a python shell

2008-05-30 Thread Lee
Friday, May 30, 2008 9:55 PM To: python-list@python.org Subject: Re: How to get all the variables in a python shell Your project interests me. Actually I was thinking about doing the same. I hadn't worked on it at all, but I though about it and had the idea about reading the session name

Re: How to get all the variables in a python shell

2008-05-30 Thread caca
Your project interests me. Actually I was thinking about doing the same. I hadn't worked on it at all, but I though about it and had the idea about reading the session namespace directly, which I though would be stored in the __dict__ attribute of something. After reading your post, I have bee

Re: How to get all the variables in a python shell

2008-05-29 Thread Tim Golden
[EMAIL PROTECTED] 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 dou

Re: How to get all the variables in a python shell

2008-05-29 Thread Tim Golden
[EMAIL PROTECTED] 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 dou

Re: How to get all the variables in a python shell

2008-05-29 Thread A.T.Hofkamp
On 2008-05-29, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi! > > 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. ok, although I personally favor the style of writing and runn