[sage-support] Re: Assigning

2008-12-22 Thread Georg Muntingh
Thanks a lot, both for the explanation and the solution! globals() did the trick for me. Georg. On Dec 22, 4:19 pm, "Mike Hansen" wrote: > On Mon, Dec 22, 2008 at 6:12 AM, Timothy Clemans > > wrote: > > > sage: sage0("var('a b c')") > > (a, b, c) > > sage: sage0("a = b/c") > > > b > > That's n

[sage-support] Re: Assigning

2008-12-22 Thread Mike Hansen
On Mon, Dec 22, 2008 at 6:12 AM, Timothy Clemans wrote: > > sage: sage0("var('a b c')") > (a, b, c) > sage: sage0("a = b/c") > > b That's not quite right as it creates 'a' in a different session. There are a few variations depending on exactly what you want to do. If you want to assign something

[sage-support] Re: Assigning

2008-12-22 Thread Timothy Clemans
sage: sage0("var('a b c')") (a, b, c) sage: sage0("a = b/c") b - c On Mon, Dec 22, 2008 at 9:03 AM, Georg Muntingh wrote: > > A quick question: If one is given a variable name as a string s, how > can one assign a sy