ANNOUNCE: Python-Gtk Version 0.4




>From the README:


Python-Gtk version 0.4
======================

What is it?
-----------

Gtk is a general graphic toolkit for X, similar to Tk, Qt, or
Motif.  Gtk is implemented entirely in C.  It is flexible, fast,
and free (LGPL).  python-gtk is a package allowing the Gtk toolkit
to be used from within Python.  It is licensed under either the
LGPL or the Perl Artistic License.

This package consists of two main parts:

	_gtkmodule.so:  a dynamic module allowing access to the
			gtk library.

	gtk.py:	an object oriented wrapper around _gtkmodule.so.



A Small Example
---------------

import gtk
def hello():
	print "hello world"

w = gtk.Window()
b = gtk.Button("Hello")
b.signalConnect("clicked", hello)
w.add(b)
b.show()
w.show()
gtk.main()



Required Software
-----------------

This package has been developed for gtk+971025, Python 1.4 and
SWIG 1.1.  Other versions of Python probably will work but other
versions of SWIG or Gtk probably won't.  You need to have the Gtk
libraries properly installed.  Also, you will need the Python
header files (Python.h).  If you want to regenerate the C wrapper
file, you will need SWIG.

	Gtk: http://www.gimp.org/gtk/
	Python: http://www.python.org/
	SWIG: http://www.cs.utah.edu/~beazley/SWIG/swig.html



Installation
------------

Take a look at the Makefile.  It is pretty simple.



Status
------

Almost all of the API function calls from the Gtk are available
from _gtk.  There is little or no access to the underlying
datatypes.  I will be investigating wether this capability is
necessary.  You should be able to accomplish almost everything
with just the function calls.

Some of the tricky stuff--signal connections, timeout callbacks
and idle callbacks--has implemented.  The Python wrapper module
(gtk) is also almost fully complete.  Most major objects have
been lightly tested.

This software is still alpha.  While the C interface (_gtk) is
nearly complete, it has not been well tested.  Also, I think the
design of the classes wrapping the interface (gtk.py) is very
important.  My approach seems to be working so far, but I am not
sure about larger applications (subclassing widgets, etc).  Any
help with the design of this module would greatly be appreciated.
I hope I can do better than Tkinter.



Where to Get It
---------------

	http://www.ucalgary.ca/~nascheme/python-gtk/



Contact Info
------------

I would appreciate any feedback on this software.


	Neil Schemenauer <nascheme@acs.ucalgary.ca>
	http://www.ucalgary.ca/~nascheme/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]