Pari Python

Anton Mellit mellit at gmail.com
Mon Oct 29 09:33:57 EDT 2007


Hi,
thanks for the comments. I think I should target on making my module
as a normal python module without using any modifications and
additionally (only additionally) provide some optional workaround for
the '^' and '/' problem. I am going to look at what Michael proposed

> With that in mind, why not implement your shell layer using pypy (python
> on python). That way you can have a full python parser that you can
> modify to your hearts content, running on an unmodified cpython core.
> Or implement your own parser using pyparsing.

> Or how about this:  Implement a shell in python that uses regex to
> replace and translate PariPython syntax into python syntax, and then
> evaluate it on the unmodified core.

Also I will look at how it is done in SAGE. SAGE is very difficult to
work with, it is definitely not pythonic and it is not implemented as
a bunch of python modules like I would prefer it. I can't find out how
to eliminate all the garbage there and leave only the python core. Its
pari support seems superficial. In many cases you have to evaluate
strings using pari interpreter like 'gp("a = intnum(x=0,6,sin(x))")'
(excerpt from the documentation).

Actually it should be nice to have this workaround available
separately for use by other math packages.

Anton



More information about the Python-list mailing list