Python for low-level Windows programming

H

haxier

Hi all

I've some experience with Python in desktop apps, but now I'm looking
to code a tool like Kee-Pass[1] 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.

Thanks

[1] http://sourceforge.net/projects/keepass
 
T

Tim Golden

haxier said:
I've some experience with Python in desktop apps, but now I'm looking
to code a tool like Kee-Pass[1] 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.

Good luck!

TJG
 
T

Troels Thomsen

Well of course I don't know exactly what you'd need, but the
answer's certainly Yes :)

Need I mention that it is also easy to write a windows service, using
pyservice (i think ...) and ½ a page of python source

tpt
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top