On Sun, Aug 7, 2011 at 9:06 AM, Sam Magura <[email protected]> wrote:
> Thanks for looking over it Aaron.
> - Executing: I will add a setting eventually that lets you use Enter rather
> than Shift+Enter.
> - Pretty printing: Are you sure you were using my sympy fork?
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?
> --- I will set unicode pretty printing to be enabled by default
> - Parser: Almost everything in ./parsing is straight from Symbide. I'm sure
> it needs some clean-up. The main thing it does that sympify() can't do is
> detect undefined variables, and then define them as symbols.
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'>
By default, it uses the default namespace, so if you define a
variable, it doesn't recognize it. But this is easy to remedy by
passing the locals() dict to sympify():
In [40]: a = 1
In [41]: sympify("a")
a
In [42]: sympify("a", locals=locals())
1
By the way, your parser has a bug where it prints the output of
variable assignments, i.e.,
: a = 1
should be silent.
> - IPython kernel: Though that is a cool example, I don't think it is right
> for this project.
> --- Parsing: I think special IPython shorthand syntax could make automatic
> symbol definition much more
> difficult. http://ipython.org/ipython-doc/stable/interactive/reference.html#automatic-quoting
This can all be disabled. Indeed, I've disabled autocall in my own
personal IPython config file because I don't like it.
> --- Execution: I'm currently working on an execution model that lets the
> user kill the process that is doing the execution without losing their
> namespace (all the variables set in that session.) I think using IPython
> would complicate this; features like output caching are going to break when
> moving execution to a new process.
Interesting. I don't know if the IPython architecture would let you
do this. You'd have to ask on their list.
> - Plotting: Agreed. That's something I want to work on.
> - GTK: That's too bad that it's hard to get GTK working on Mac. This
> application claims to have GTK and PyGTK compiled for
> you: http://0install.net/install-mac.html. No idea if it works
> Sam
I'll try it out.
Aaron Meurer
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
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.