Re: alternatives to mswgui

Thomas Heller <[email protected]> 14 Nov 2002 21:15:35 +0100
Newsgroups gmane.comp.python.anygui.devel
Message-ID <[email protected]>
> >I forgot to say: ctypes requires Python 2.2, and this can't be fixed.
> >It is full of metaclasses =-)
> >
> Are these required or just an indication of bleeding edginess? You could
> do inheritance from C types before otherwise the stuff in Zope couldn't
> have worked.

These are required.  Actually, ctypes is the current version of code
which I have *very* long, written around 1992 os so. It was the calldll
lookalike for a custom scheme interpreter, running under Windows 3.1,
when there was no 32-bit support.

When I discovered Python later (I think it was 1.4, although the book
I had still used 1.3), I ported it to Python, and since then I've
updated and extended it.

Soon I discovered that loading and calling functions from dlls is one
thing, the other thing is constructing the data types these functions
require as arguments or use as return value - and Windows (which I
normally use) is not really known for it's simple data types. The COM
type description interfaces are good examples for that.

And my ultimate goal was to replace win32all with this stuff ;-).

I had implementations which used pure Python solutions (coded using
the struct module), ExtensionClass implementations, and more.  All
this was either really slow (the struct solution), or a pain
(ExtensionClass). I don't remember the details exactly now any more...

Then came python 2.2, and all changed. Class methods, properties, and,
most important, the ability to prototype in Python, reimplement parts
of the code in C and specialize the behaviour with Python methods.  I
am also very much interested in speed. This is not too important for
GUI stuff, but I want more.

I should mention that the C data types which are provided by the
ctypes module contain an awgul lot of functionality, not only in the
instances, there's also behaviour in the classes themselves.

Probably most of this isn't yet documented.

Thomas



-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html