I finished some working version of the pari-python module. I tried to make it is close as possible to the standard PARI shell, at the same time using the standard python syntax. Here I put some screenshots. I didn’t make a proper package distribution for python (the code still looks ugly and I still don’t know how to make proper distributions), but if someone is interested to test it send me an email. This is in early alpha stage. A lot of things are not working. I imported almost all functions of gp by an automated perl script but I don’t know which of them actually work and which not.
October 28, 2007
October 22, 2007
I rewrote the LaTEX lexer for the Scintilla text editor.
Now it is more customizable, distinguishes math mode (both inline and environments like align, multline), supports folding, section headings, highlights environment names, etc.
This is how intnum works with my module:
>>> import pari >>> def f(x): ... return x^2 ... >>> pari.intnum(0,1,f) 0.3333333333333333333333333333
Actually it works faster than in the standard PARI shell. The reason, I think, is that every time PARI wants to compute the value of the function we integrate it parses the string defining the function. In my case I simply do a function call which is faster.
October 20, 2007
I took a screenshot of my laptop’s screen. On top you see the “Stardock” bar which is similar to the Mac’s bar, the front window is “Kile” which is a KDE program for linux (running under cygwin), but the operating system is Windows XP! Click to view the original size image.
I am trying to make a project on Sourceforge.net. Here is the description I sent to the administrators for review:
A module for Python which provides interface to the PARI/GP computing library. We propose to write programs for PARI using Python scripting language. Python makes code much more clean, readable and manageable than the old-style PARI scripts.
October 5, 2007
I’ve played with Python a little bit and find it cool. I want to create a PARI extension for Python. I started to do something on Windows. This seems to be impossible. PARI uses cygwin and it seems cygwin programs are not friends with non-cygwin programs. Python for Windows crashes when I force it to load cygwin1.dll. A pity. Several hours of browsing in forums to find a solution wasted. So we do it on Cygwin completely.