On Sun, Aug 16, 2015 at 5:45 PM, saad khalid <[email protected]> wrote:
> Ahh, yes, sorry, I think I copied the output from global().key() by mistake.
> I meant that it's a long list compared to the number of variables I had
> actually defined, considering I hadn't actually defined any. I guess I was
> looking for a function that returned to me the variables that I had defined.

I looked at the source code of show_identifiers() (which I wrote a
long, long time ago).  If you type

   sage.misc.session.state_at_init = dict(globals())

it will reset the state and work as you want.  Note that in SMC it will show

   ['smc', 'require', 'salvus']

which get injected each time a cell evaluation happens.  I put an
example illustrating this at the bottom of

  
https://cloud.sagemath.com/projects/4a5f0542-5873-4eed-a85c-a18c706e8bcd/files/support/2015-08-16-162239-show-identifiers.sagews

I've created a ticket to address this:

   https://github.com/sagemathinc/smc/issues/63

William

>
> On Sunday, August 16, 2015 at 5:14:17 PM UTC-5, saad khalid wrote:
>>
>> I was following along in the sage tutorial for showing variables:
>> http://doc.sagemath.org/html/en/reference/misc/sage/misc/session.html
>>
>> I tried running the show_identifier() command in a new worksheet on Sage
>> Math Cloud, and I got a very long list of variables, that I'm assuming are
>> predefined and come with every worksheet. They started with:
>>
>> 'paretovariate', 'cartan_matrix', 'dynamic', 'elliptic_curves'...
>>
>> Is this a bug? Or am I doing something incorrectly? I'd like to just see
>> the variables that I defined in that worksheet. Thanks!
>
> --
> 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.
> For more options, visit https://groups.google.com/d/optout.



-- 
William (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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to