Python for low-level Windows programming
mail at timgolden.me.uk
Thu Apr 3 09:56:31 CEST 2008
> I've some experience with Python in desktop apps, but now I'm looking
> to code a tool like Kee-Pass which must have access to some low-
> level primitives in a windows environment: hooks when windows are
> displayed, automatic form fill, and so on in a variety of scenarios
> (desktop apps, web-based apps, citrix...)
> Is this possible without too much pain? I know I can code it with C#
> or C++ but tha'ts a road to avoid, if possible.
Well of course I don't know exactly what you'd need, but the
answer's certainly Yes :) In short, even native Python comes
with the ctypes module which will let you call -- with only
a little working out the structures -- into any Windows DLL
or COM interface (the latter via the comtypes extension).
But in any case the pywin32 packages and various other
open source projects have already done a lot of the work
for you. Plus it's easy enough to write your own extension
which does the dirty work in C and exposes it to Python as
functions, objects or whatever suits your purposes.
More information about the Python-list