Ask Your Question
0

Viewing variables in memory

asked 2013-11-14 20:06:23 -0500

jaia gravatar image

Does Sage provide any way to see which variables and user-defined functions are currently in memory, like the ls() command in R?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-11-14 21:51:54 -0500

gundamlh gravatar image
sage: a,b,c,d = var('a,b,c,d')
sage: who
a       b       c       d
sage: whos
Variable   Type          Data/Info
----------------------------------
a          Expression    a
b          Expression    b
c          Expression    c
d          Expression    d

Is it what you want?

edit flag offensive delete link more

Comments

Yes, but it's not working on my system (Sage 5.12 running on Ubuntu 13.10.) I just get a name error.

jaia gravatar imagejaia ( 2013-11-15 06:06:18 -0500 )edit

Sorry, I have no idea about that.. my sage: 'Sage Version 5.10, Release Date: 2013-06-17' on openSuSE 12.3

gundamlh gravatar imagegundamlh ( 2013-11-15 07:00:57 -0500 )edit
1

This is not a question of versions, `who` and `whos` are specific to ipython (the command line), they do not work in the notebook.

tmonteil gravatar imagetmonteil ( 2013-11-16 10:52:40 -0500 )edit

That would be a great feature to have. I can definitely see using it to debug student (and my own) code.

jaia gravatar imagejaia ( 2013-11-16 21:14:50 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-11-14 20:06:23 -0500

Seen: 96 times

Last updated: Nov 14 '13