How should I learn to use the Windows API with Python? How should I learn to use the Windows API with Python? python python

How should I learn to use the Windows API with Python?


Honestly, no. The Windows API is an 800 pound monster covered with hair. Charlie Petzold's 15 pound book was the canonical reference once upon a time.

That said, the Python for Windows folks have some good material. Microsoft has the whole API online, including some sample code and such. And the Wikipedia article is a good overview.


About 4 years ago I set out to truly understand the Windows API. I was coding in C# at the time, but I felt like the framework was abstracting me too much from the API (which it was). So I switched to Delphi (C++ or C would have also been good choices).

In my opinion, it is important that you start working in a language that creates native code and talks directly to the Windows API and makes you care about buffers, pointers, structures, and real constructs that Windows uses directly. C# is a great language, but not the best choice for learning the Windows API.

Next, buy Mark Russinovich's book "Windows Internals" Amazon link. This is the 5th edition. The 6th edition is coming out April 2012 and adds info about Server 2008 R2 and Windows 7.

And now, for the most important (and best) resource for learning Win32 API:

Mark Russinovich's Windows Operating Systems Internals Curriculum which is offered for free.

It is designed to be used by an instructor to teach students. I went through it and it is awesome. Full of examples, history, and detailed explanations. In my opinion, this is an ideal way to learn the Windows API.

Mark Russinovich is a Microsoft Technical Fellow (there are only 14 at MS including the creator of C#). He used to own Winternals until he sold it to MS, he has a PhD in Computer Engineering from Carnegie Mellon, he has been a frequent presenter at Microsoft conferences (even before he worked for them), and he is crazy smart. His presentations are one of the primary reasons I attend Microsoft TechEd every year.


I strongly recommend theForger's Win32 API Tutorial. Its a C tutorial, but he pretty much holds your hand and shows you the basics. Its also pretty short, which is nice in a tutorial.