[Tutor] question about listing variables defined since session started

Comer Duncan comer.duncan at gmail.com
Mon Apr 30 23:25:45 CEST 2012


Hi,

I have a newbie type question.  Say I have started a python (or
ipython) session and have done some imports and have also defined some
new variables since the session started.  So, I have in my current
namespace a bunch of things. Suppose I  want to list just those
variable  names which have been defined since the session started but
not include the names of the objects that who and whos will return.
How to do that?  In matlab, this is what the who returns, but in
python I seem to always get a raft of things since I typically do
import a bunch of things.

Thanks for your suggestions.

Comer


More information about the Tutor mailing list