Python for low-level Windows programming - Python
This is a discussion on Python for low-level Windows programming - Python ; 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 ...
-
Python for low-level Windows programming
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
-
Re: Python for low-level Windows programming
haxier wrote:
> 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
-
Re: Python for low-level Windows programming
>>
>> 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 
Need I mention that it is also easy to write a windows service, using
pyservice (i think ...) and ½ a page of python source
tpt