I have very little experience building software for windows, and zero experience using the windows API, is there a good (preferably online), free resource to learn how to use the windows API(preferably 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 on line, including some sample code and such. And the Wikipedia article is a good overview.
Learning Win32 API is 5% of initial understanding of concepts and the patterns used and 95% of RTFM.
For those initial 5% the Petzold book is really good but I suspect that there ought to be some online tutorials which you can find in google as good as I can to find.
Really, once you get the hang of it it's really straight forward do to be able to do anything. Once you get there it would probably be time to move on to something better like QT and never touch Win32 API ever again. Nowadays no one really uses bare Win32 API for anything more than trivial due to the sheer overhead it involves and the extreme lack of comfort.
As Charlie says : "this Api is an 800 pound monster covered with hair".
Consider using the express version (free) of visual studio for vb or c# (http://www.microsoft.com/express/) along with the msdn library (http://msdn.microsoft.com/en-us/library/default.aspx). this will give you as much exposure to the api as you want.
Once upon a time I read over some Win32 API tutorials at www.relisoft.com
They are an anti-MFC and pro-Win32 API shop and have a manifesto of sorts explaining practical reasons for why.
They also have a general C++ tutorial. 99% of the time I like their programming style for what it's worth.
All you need is completely free on MSDN.COM. Win32 is easily programed using C/C++, C#, and Visual Basic. I recommend C/C++. YOu can download the Visual Studio Express editions here.
All the documentation (not an abbreviated form) is on the web here.
Note that Win32 is often loosely used to mean "all the programming interface for Windows". More cannonically, it is the base native set of APIs for user mode applications. There a similar set of APIs for drivers and kernel components. You can learn about that here.
Microsoft has many other windows programming interfaces as well: The Common Language Run time and .NET frame work is a manged layer on top of windows. There are many other API families as well such as DX9 and DX10 (good link to game programming here).
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.
Since you've asked about Python, why do you need the Win32 API ? That's used for writing small, fast C/C++ programs. If your tool is Python, just download wxPython which runs wonderfully on Windows and produces sleek native GUIs with 1% the code and the effort.
" > free resource to learn how to use the windows API (preferably with python)
You may refer Python Programming on Win32 by Mark Hammond and Andy Robinson along with pywin32.
If you are not interested to use pywin32, you can use ctypes — A foreign function library for Python and the Forger's Win32 API Programming Tutorial.
Refer Example Code : Shared Memory with Mutex (pywin32 and ctypes)
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 4th edition. The 5th edition is coming out next month and adds info about Server 2008 and Vista.
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.
Umm...a lot of people have put the cart before the horse on this one. The question I have for you is: why do you want to learn Win32?
If you want to learn it so you can build Windows user interfaces, perhaps consider wxPython instead. If you only plan on calling into non-visual Win32 APIs then the Petzold book may not be the best. There are tools like SWIG that make calling libraries such as Win32 easier from languages like Python.