[Python-Dev] call for Windows developers
21 Feb 2003 20:27:52 +0100
(This may be off-topic, but only slightly IMO.)
I'm looking for one, two, or three experienced Python developers
on Windows to participate in an exciting open-source project.
As some people on this list might know, the ctypes project
http://starship.python.net/crew/theller/ctypes.html has had a good
In short, ctypes is an improved calldll replacement. The longer
description is that it lets you in pure Python build, access, and
manipulate simple, but also very complicated C data types (structures,
unions, pointers, function pointers, callback functions) and use them
to call functions in shared libraries/dlls. It currently runs on
Windows, Linux, and MacOS X, the latter two with the help of the
Not only allows it to call, for example, win32 functions not (yet)
exposed by Mark Hammond's win32all stuff, I think it is powerful
enough to create bindings in pure Python to whole systems or
frameworks. (That's the reason I think this post is not totally
off-topic for this forum).
Using ctypes is sometimes like programming C in a Python syntax, this
may sound strange, but it's where I as a Python and C hacker feel
quite at home ;-), just that I don't need the compiler any more...
I would now like to create a COM framework. ctypes makes it easy to
access COM vtables, and also easy to build them at runtime. Different
from Mark's pythoncom, it would concentrate more on custom interfaces
than on IDispatch - just what is needed if you have to interface to
clients and servers implemented in ATL.
My ultimate goal would be to be able to write ActiveX controls in pure
Python, and write containers for AX controls in pure Python.
So far, I have written proof-of-concept code with fairly good
typelibrary/typeinfo support for both the client side and the server
side. I have local and inproc servers running, can send and receive
events via the connection point mechanism, can automatically create
type libraries for COM interfaces written in Python, can decompile
type libraries and generate Python source code wrappers for them, so
that it's easy to use these interfaces in Python, and so on. All for
simple cases only, though.
As things usually go, I'm not happy with this code, although I've
learned a lot, and started the first rewrite. The rewritten code is
in the ctypes CVS repository, in a sandbox subdirectory.
Supporting open-source projects is a large goal, and I'm quite sure I
cannot do it for the ctypes COM stuff alone. So currently I have to
decide whether this stays at the level of 'ctypes sample code', or if
it will evolve into a useful addition to the Python toolkit on
Windows, but, I need some help.
Thanks for the attention,