On Sunday, August 7, 2011 9:09:57 PM UTC-4, Aaron Meurer wrote:
>
> Ah, no. I didn't know about this. Assumedly it is some branch at
> your GitHub fork?
>
> What did you have to change in your fork to make it work?
>
Yes, it's the master branch of my sympy fork. Here's the pull request:
https://github.com/sympy/sympy/pull/500
> Yes it does:
>
> In [33]: a
> ---------------------------------------------------------------------------
> NameError Traceback (most recent call last)
>
> /Users/aaronmeurer/Documents/python/sympy/sympy/<ipython-input-33-60b725f10c9c>
> in <module>()
> ----> 1 a
>
> NameError: name 'a' is not defined
>
> In [34]: sympify("a")
> a
>
> In [35]: type(sympify("a"))
> <class 'sympy.core.symbol.Symbol'>
>
Ah, I see what you are saying. I thought you were saying that
>>> sympify("a = b**2")
would define b as a symbol. But rather, what I can do is something like
>>> #Return raw Python code
.... my_parser("a = b**2")
"sympify('b', locals=locals())
a = b **2 "
> By the way, your parser has a bug where it prints the output of
> variable assignments, i.e.,
>
> : a = 1
>
> should be silent.
>
>
> Not a bug, but OK, (having it silent) would be more in line with the Python
console. Added to future feature list.
I've just gotten back to school, so probably won't be doing much work over
the next week. I'll notify you when I add new major features.
Sam
>
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/sympy/-/KTO7Sl6-mnoJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.