Ask Your Question
0

Viewing variables in memory

asked 11 years ago

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?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 11 years ago

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?

Preview: (hide)
link

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 ( 11 years ago )

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 ( 11 years ago )
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 ( 11 years ago )

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

jaia gravatar imagejaia ( 11 years ago )

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: 11 years ago

Seen: 951 times

Last updated: Nov 15 '13