Win32 How Do I...?


The idea of this page is to answer various of the How Do I...? questions relating to Python under Win32. Although I probably will cover some simpler things, the intention is to group subjects which are less commonly covered in the books and mailing lists. You could see it as a kind of infrequently-asked questions.

Where possible, the approach is to present a complete fragment of code which will run by itself and do something both useful and self-explanatory and which will illustrate the use of the technique or API calls in question. If more code is needed than will fit easily on a screen, I will usually give a module to download and will present code which uses that module.

As with the other examples on this site, these are designed to be cut-and-pasted straight into a .py file, or even onto an open Python interpreter window. However, either because of the nature of the code or for some irritating browser-related reason, not all examples will cut-and-paste directly into an interpreter. YMMV.

NB Most if not all of the examples make extensive use of the pywin32 extensions which are in effect part of the stdlib on Windows.

I have attempted to give credit where I've basically copied someone's else's example but if you believe I've done you an injustice, please get in touch. Unless otherwise indicated, all examples are (c) Tim Golden and are licensed under the (GPL Compatible) MIT License.

How Do I...?