Thank you for the reply! I took note and I will use the show_identifiers() 
function whenever necessary, as the it seems more useful than the "who" 
command.

João Alberto Ferreira.

On Wednesday, April 24, 2013 10:36:45 PM UTC-3, William wrote:
>
> Hi,
>
> I've never heard of this "who" function, but evidently it is in Ipython so 
> the sage command line automatically has it.  Having never heard of "who", I 
> had implemented something similar for Sage back in 2004 (!) called 
> "show_identifiers()", which is like the same function in Magma (which is 
> called ShowIdentifiers() there).  It is evidently different than "who" in 
> Ipython, since:
>
> sage: 
> show_identifiers()                                                            
>                                                             
>
> ['Out', 'get_ipython', 'sage_prompt', 'In', 'exit', 'quit']                   
>                                                                   
> sage: 
> R = 250e3                                                                     
>                                                             
> sage: 
> show_identifiers()                                                            
>                                                             
> ['Out', 'get_ipython', 'sage_prompt', 'In', 'exit', 'R', 'quit'] 
>
>       
>
> With show_identifiers I made it record the actual objects at startup, and 
> check to see if they change. 
>
> The code is here if you want to look at it:
>
>   https://github.com/sagemath/sage/blob/master/src/sage/misc/session.pyx
>
> As show_identifiers() is a normal function call it should also work in the 
> notebook, scripts etc., rather than only on the interactive command line.
>  
> William
>
>
> On Wed, Apr 24, 2013 at 2:27 PM, João Alberto Ferreira 
> <[email protected]<javascript:>
> > wrote:
>
>> Ok! thank you!
>>
>>
>> On Wednesday, April 24, 2013 6:15:06 AM UTC-3, Volker Braun wrote:
>>>
>>> "who" prints the newly-defined variables, but R is already defined as 
>>> the r-system.org interface. You can redefine it as you want, but as far 
>>> as Python is concerned that just changes a variable but doesn't add a new 
>>> one.
>>>
>>>
>>>
>>> On Tuesday, April 23, 2013 10:34:15 PM UTC+1, João Alberto Ferreira 
>>> wrote:
>>>>
>>>> Hi! 
>>>>
>>>> I was executing the examples of the Sage Beginner's Guide book when I 
>>>> found a curious behavior in Sage. 
>>>>
>>>> Whenever I launch Sage and define the variable 
>>>>
>>>> sage: R = 250e3 
>>>>
>>>> and issue the command 
>>>>
>>>> sage: who 
>>>>
>>>> the output is 
>>>>
>>>> Interactive namespace is empty. 
>>>>
>>>> If I define other variables and issue again the command "who", the 
>>>> other variables name are returned, but not the "R" variable name. 
>>>>
>>>> Whenever I launch Sage and define a different variable name, like 
>>>>
>>>> sage: j = 250e3 
>>>>
>>>> and issue the command "who", the output is presented correctly as "j". 
>>>>
>>>> Is this a bug or I missed something? 
>>>>
>>>> Cordially, 
>>>>
>>>> João Alberto Ferreira. 
>>>>
>>>> ----- 
>>>> ~$ uname -a 
>>>> Linux Hades 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:26 UTC 
>>>> 2013 i686 athlon i386 GNU/Linux 
>>>>
>>>> sage: version() 
>>>> 'Sage Version 5.8, Release Date: 2013-03-15'
>>>
>>>  -- 
>> You received this message because you are subscribed to the Google Groups 
>> "sage-support" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/sage-support?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>  
>>  
>>
>
>
>
> -- 
> William Stein
> Professor of Mathematics
> University of Washington
> http://wstein.org
>  

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to