Re: [sage-support] evaluate a string in the current scope

2023-04-16 Thread G. M.-S.
Thanks Dima. I think that sage: eval(preparse(string)) does what I need. Guillermo On Sun, 16 Apr 2023 at 23:45, Dima Pasechnik wrote: > On Sun, Apr 16, 2023 at 9:32 PM G. M.-S. wrote: > > > > Is there a way to evaluate a string in the current scope? > > > > So that > > sage: expression > > an

Re: [sage-support] evaluate a string in the current scope

2023-04-16 Thread Dima Pasechnik
On Sun, Apr 16, 2023 at 9:32 PM G. M.-S. wrote: > > > Is there a way to evaluate a string in the current scope? > > So that > sage: expression > and > sage: some_evaluate(str(expression)) > give the same thing at the same place. > I know about sage_eval, but it seems to need a dictionary of everyt

[sage-support] evaluate a string in the current scope

2023-04-16 Thread G. M.-S.
Is there a way to evaluate a string in the current scope? So that sage: expression and sage: some_evaluate(str(expression)) give the same thing at the same place. I know about sage_eval, but it seems to need a dictionary of everything in the local scope. For instance, sage: a=3 sage: a^2 9 sage: