README: PYTHON BINDING WITH SWIG


FOR DEVELOPERS
--------------
If you plan to contribute to the libgexf library, you will need to install SWIG (swig-1.3.40)
to generate a new libgexf_wrap.cpp wrapper each time you will modify the libgexf.i interface file.
Note that earlier releases like swig 1.3.40 will *not* work since we use a special dependency in
the libgexf.i interface, only available on the latest release of swig.

Manual Python binding with swig on Linux:
   $ swig -c++ -python -fvirtual -o libgexf_wrap.cpp libgexf.i
   $ gcc -fPIC -c libgexf_wrap.cpp ../../gexf.cpp ${OTHER_CPP_FILES} -I/usr/include/python2.5 -I/usr/include/libxml2
   $ g++ -shared -lxml2 libgexf_wrap.o gexf.o ${OTHER_O_FILES} -o _libgexf.so

Automated Python binding with swig on Linux:
   $ swig -c++ -python -o libgexf_wrap.cpp libgexf.i
   $ python setup.py build
or directly (if libgexf_wrap.cpp is provided)
   $ python setup.py build


INSTALLATION
------------
To install:
   $ sudo python setup.py install

to build
    $ python setup.py build
   
to distribute
    $ python setup.py sdist


USAGE
-----
To use :
   $ ipython
    >>> import libgexf
    >>> from libgexf import *
    >>> g = GEXF()
   ...


TEST
----
To test:
  Copy the test.py file into the appropriate build directory.
  Change the python version if necessary.
  Edit the gexf input file.
  $ ./test.py


SWIG+PYTHON DOCUMENTATION
----------------------
http://www.swig.org/Doc1.3/Python.html
