Pearu's Python Modules

NOTE: This page contains obsolete modules (except pythonrun)!!!

These modules are obsolete because I don't work with them anymore.

Instead, I recommend PyPolyhedron for cddlib and f2py for interfacing Fortran routines (vode,hybrd,etc.)




Below you find a number of Python modules that I use in my projects. Some of them are my interfaces to various C and FORTRAN libraries that should compile on platforms like Linux-i686, Linux-alpha, and HP-UX; the former platform is where I run them most often.

See also Related stuff below.

Polyhedral Computation

Here I have a Python interface to cddlib C library written by Komei Fukuda. The cddlib implements the conversion between H and V-representations of general convex polyhedron using the Double Description Method. See FAQ in Polyhedral Computation" for more information.
cddlib/ cddlib-latest.tgz
Compilation and Installation:

Ordinary Differential Equation solver VODE

Extract form the file vode.f :
C DVODE.. Variable-coefficient Ordinary Differential Equation solver,
C with fixed-leading-coefficient implementation.
C This version is in double precision.
C DVODE solves the initial value problem for stiff or nonstiff
C systems of first order ODEs,
C     dy/dt = f(t,y) ,  or, in component form,
C     dy(i)/dt = f(i) = f(i,t,y(1),y(2),...,y(NEQ)) (i = 1,...,NEQ).
C DVODE is a package based on the EPISODE and EPISODEB packages, and
C on the ODEPACK user interface standard, with minor modifications.
Authors of VODE are P.N. Brown, A.C. Hindmarsh, and G.D. Byrne. See file vode.f for more information.

Below you can download Python interface to VODE.

vode/ vode-latest.tgz
Compilation and Installation:

Fixed points

Here I have written Python interface to MINPACK files hybrd.f:
c     the purpose of hybrd is to find a zero of a system of
c     n nonlinear functions in n variables by a modification
c     of the powell hybrid method. the user must provide a
c     subroutine which calculates the functions. the jacobian is
c     then calculated by a forward-difference approximation.
and hybrj.f (here user can provide the jacobian).
fixpt/ fixpt-latest.tgz
Compilation and Installation:

Note that Travis Oliphant is working also on the Python interfaces to MINPACK (and others), called multipack. I will most likely start using his interfaces and stop developing fixpt further, if I will have positive experience with TO's packages.

Bugs and problems

If there are compilation problems you may want to take a look at Makefile and modify it to your needs.

There may be memory leaking problems; if you find fixes, please send them me too ;-)

At this point there is no documentation available. You just have to read the headers of py-files and study (and try out) the corresponing test codes.

Related stuff

pythonrun v1.1 - Run Python from LaTeX

pythonrun.sty is a LaTeX2e package that can be used for writing a Latex document if the author wishes to include python code fragments to it. Most importantly, these code fragments can be executed and the results of can be included to Latex output, dynamically. These Latex documents must be compiled with --shell-escape option. One can also ``distill'' these Latex documents (that is to make them ``static'', and so that the latex->html converters can be applied).

The purpose of pythonrun.sty is to ease writing python specific tutorials in LaTeX.

pythonrun/ pythonrun.tgz
User's Guide:, pythonrun.dvi, pythonrun.tex, pythonrun.html

Valid HTML 4.0! Pearu Peterson <>
Last modified: Thu Jan 18 16:56:58 EET 2001
Submit this page for validation