Many modern C programmers create interfaces that are object oriented; for
example, the graphics toolkit GTK+. (www.gtk.org)

Tools like SWIG provide a way to access C APIs in other languages. For python
it makes C functions availible as python functions, and C structs as python
classes and objects. Consider the following C interface:

    typedef struct {
	int x;
	int y;
    } Point;
    
    Point * point_new();
    void point_set_x(Point * p, int x);
    int point_get_x(Point *p);
    void point_set_y(Point * p, int y);
    int point_get_y(Point *p);
    void point_move_up_right(Point *p);
    void point_move_left(Point *p, int by);

Here is what interaction with this interface would look like if you used SWIG
to generate python bindings:

    from point_module import point_new, point_set_x, point_move_up_right, \
			     point_move_left

    p = point_new()
    point_set_x(p, 2)
    point_move_up_right(p)
    point_move_left(p, 5)


An interface like this would be more useful:

    from point_module import Point

    p = Point()
    p.set_x(2)
    p.move_up_right()
    p.move_left(5)

PyCClass exists to help you make a python interface like this from an object
oriented C api.



Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts.

A copy of the license is included in doc/COPYING