Python interface to GDChart
gdchart-py-0.6
16 March 2001

GETTING IT

  You can find the latest source code and Win32 binary at my site:

    http://athani.pair.com/msteed/software/gdchart/

FILES

  The following files make up the Python interface to GDChart:

  CHANGES              Release history.
  Makefile             Module makefile for Unix platforms.
  Makefile.w32         Module makefile for Win32.
  README               This file.
  TODO                 Unfinished tasks, future plans.
  chart.py             A wrapper class for gdchart.
  gd-1.8.4/*           The gd library source (Thomas Boutell).
  gdc_py.c             The Python module source.
  gdchart.def          DEF file for the Win32 build.
  gdchart0.10.1dev/*   The GDChart library source (Bruce Verderaime).
  test.html            For viewing graphics generated by test.py.
  test.py              Examples of gdchart-py in action.
  w.gif                Background image used by test.py.

BUILDING

  To build the Python interface to GDChart, you must have installed the libpng
  and zlib libraries.  If you want JPEG support, you must also have installed
  the jpeg-6b library as well.

  -Linux, Solaris, HP-UX, other Unices-

    1. Edit Makefile and change the settings as appropriate.
    2. make

  This should produce gdchart.so (or gdchart.sl), which you can then copy to a
  convenient place, e.g., somewhere in your $PYTHONPATH.  If you run into
  build problems, I will do what I can to help.  I don't have access to
  Solaris or HP-UX.

  -Win32-

  A pre-built Win32 binary is available from my site (see above).  If you want
  to build it yourself, read on...

  To build the module under Win32, you must use gcc.  This is because GDChart
  itself must be built with gcc.  I used gcc-2.95.2/mingw32.

    1. Set up the mingw32 tools: http://www.mingw.org/

    2. Make a Python import library (adjust for your setup and version of Python):

        impdef c:/windows/system32/python21.dll >python.def
        dlltool --dllname python21.dll --input-def python.def --output-lib libpython21.a

       dlltool is part of the mingw32 tools; you can get impdef from my site:

        http://athani.pair.com/msteed/software/misc/impdef.zip

    2. Edit Makefile.w32 and change the settings as appropriate.  The makefile
       knows how to build libpng, zlib, and jpeg-6b, and assumes that they are
       in subdirectories of the gdchart-py directory.  I had to tweak some
       makefiles to get all the libraries to build.

    3. make -f Makefile.w32

  This should produce gdchart.pyd, which you can then copy to a convenient
  place, e.g., somewhere in your $PYTHONPATH.  If you run into build problems,
  I will do what I can to help.

USE

  There are doc strings for the module and the two functions that it exports.
  Beyond that, there are some examples in chart.py and test.py (some of which
  may assume that the module has been built with JPEG support), and you can
  always look at the C source code. :-)  There is some documentation on the
  GDChart library at Bruce's site: http://www.fred.net/brv/chart/
  

Mike Steed
msteed@fiber.net

