1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
PYTHON BINDINGS
This directory contains Python bindings for SAML. You have in fact two
modules: "saml0" which simply communicates with samuel/factorint/induce
through a pipe, and "saml1" which is a real interface to SAML. The first
module is incomplete and not very interesting, so I will only discuss
the "saml1" module.
The Makefile is this directory is NOT automatically executed by the
top-level Makefile; to build the saml1 module, read the following
instructions.
First, you must build SAML as a shared library; to do this, go to ../lib
and type "make shared". This will build libsaml.so.0.YYMMDD and some links.
If you want you can move them to /usr/local/lib, otherwise set your
environment variable LD_LIBRARY_PATH to point to the right directory.
Then come back to ../python, check the makefile (especially the paths) and
type "make". This will create saml1module.so. Then you can install it in
/usr/local/lib/python1.4 if you don't want to modify your PYTHONPATH.
To use the module just "import saml1" (or "from saml1 import *") and enjoy.
This directory contains some sample scripts.
NOTE: I have only tested this with Python 1.4 on a linux-elf box. I
wouldn't recommend using an older version of python, even if most of the
interfacing information comes from "Programming Python" which describes
version 1.3. Also, other Unices may need a different procedure to build
shared libraries.
The python programming interface is described in the ../doc directory.
|