Python for Window Extensions
Project description
pywin32
This is the readme for the Python for Win32 (pywin32) extensions, which provides access to many of the Windows APIs from Python.
See CHANGES.txt for recent notable changes.
Docs
The docs are a long and sad story, but there's now an online version of the helpfile that ships with the installers (thanks @ofek!). Lots of that is very old, but some is auto-generated and current. Would love help untangling the docs!
Support
Feel free to open issues for all bugs (or suspected bugs) in pywin32. pull-requests for all bugs or features are also welcome.
However, please do not open github issues for general support requests, or for problems or questions using the modules in this package - they will be closed. For such issues, please email the python-win32 mailing list - note that you must be subscribed to the list before posting.
Binaries
Binary releases are no longer supported.
Build 306 was the last with .exe installers. You really shouldn't use them, but if you really need them, find them here
Installing via PIP
You should install pywin32 via pip - eg,
python -m pip install --upgrade pywin32
There is a post-install script (see below) which should not be run inside virtual environments; it should only be run in "global" installs.
For unreleased changes, you can download builds made by github actions -
choose any "workflow" from the main
branch and download its "artifacts")
Installing globally
Outside of a virtual environment you might want to install COM objects, services, etc. You can do this by executing:
python Scripts/pywin32_postinstall.py -install
From the root of your Python installation.
If you do this with normal permissions it will be global for your user (a few files will be copied to the root of your Python install and some changes made to HKCU). If you execute this from an elevated process, it will be global for the machine (files will be copied to System32, HKLM will be changed, etc)
Running as a Windows Service
To run as a service, you probably want to install pywin32 globally from an elevated command prompt - see above.
You also need to ensure Python is installed in a location where the user running
the service has access to the installation and is able to load pywintypesXX.dll
and pythonXX.dll
. In particular, the LocalSystem
account typically will not have access
to your local %USER%
directory structure.
Troubleshooting
If you encounter any problems when upgrading like the following:
The specified procedure could not be found
Entry-point not found
It usually means one of 2 things:
-
You've upgraded an install where the post-install script has previously run. So you should run it again:
python Scripts/pywin32_postinstall.py -install
This will make some small attempts to cleanup older conflicting installs.
-
There are other pywin32 DLLs installed in your system, but in a different location than the new ones. This sometimes happens in environments that come with pywin32 pre-shipped (eg, anaconda?).
The possible solutions here are:
- Run the "post_install" script documented above.
- Otherwise, find and remove all other copies of
pywintypesXX.dll
andpythoncomXX.dll
(whereXX
is the Python version - eg, "39")
Building from source
Install Visual Studio 2019 (later probably works, but options might be different), follow the instructions in Build environment for the version you install.
(the free compilers probably work too, but haven't been tested - let me know your experiences!)
setup.py
is a standard distutils build script, so you probably want:
python setup.py install
or
python setup.py --help
Some modules need obscure SDKs to build - setup.py
should succeed, gracefully
telling you why it failed to build them - if the build actually fails with your
configuration, please open an issue.
Release process
The following steps are performed when making a new release - this is mainly to form a checklist so @mhammond doesn't forget what to do :)
Since build 307 the release process is based on the artifacts created by Github actions.
-
Ensure CHANGES.txt has everything worth noting. Update the header to reflect the about-to-be released build and date, commit it.
-
Update setup.py with the new build number. Update CHANGES.txt to have a new heading section for the next unreleased version. (ie, a new, empty "Coming in build XXX, as yet unreleased" section)
-
Push these changes to github, wait for the actions to complete, then download the artifacts from that run.
-
Upload .whl artifacts to pypi - we do this before pushing the tag because they might be rejected for an invalid
README.md
. Done viapy -3.? -m twine upload dist/*XXX*.whl
. -
Create a new git tag for the release.
-
Update setup.py with the new build number + ".1" (eg, 123.1), to ensure future test builds aren't mistaken for the real release.
-
Make sure everything is pushed to github, including the tag (ie,
git push --tags
) -
Send mail to python-win32
Older Manual Release Process
This is the old process used when a local dev environment was used to create the builds. Build 306 was the last released with this process.
-
Ensure CHANGES.txt has everything worth noting. Update the header to reflect the about-to-be released build and date, commit it.
-
Update setup.py with the new build number.
-
Execute
make_all.bat
, wait forever, test the artifacts. -
Upload .whl artifacts to pypi - we do this before pushing the tag because they might be rejected for an invalid
README.md
. Done viapy -3.? -m twine upload dist/*XXX*.whl
. -
Commit setup.py (so the new build number is in the repo), create a new git tag
-
Upload the .exe installers to github.
-
Update setup.py with the new build number + ".1" (eg, 123.1), to ensure future test builds aren't mistaken for the real release.
-
Make sure everything is pushed to github, including the tag (ie,
git push --tags
) -
Send mail to python-win32
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file pywin32-308-cp313-cp313-win_arm64.whl
.
File metadata
- Download URL: pywin32-308-cp313-cp313-win_arm64.whl
- Upload date:
- Size: 8.0 MB
- Tags: CPython 3.13, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef313c46d4c18dfb82a2431e3051ac8f112ccee1a34f29c263c583c568db63cd |
|
MD5 | c8d49b728dfafbe2373494d8f96c0fab |
|
BLAKE2b-256 | 26df2b63e3e4f2df0224f8aaf6d131f54fe4e8c96400eb9df563e2aae2e1a1f9 |
File details
Details for the file pywin32-308-cp313-cp313-win_amd64.whl
.
File metadata
- Download URL: pywin32-308-cp313-cp313-win_amd64.whl
- Upload date:
- Size: 6.5 MB
- Tags: CPython 3.13, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd380990e792eaf6827fcb7e187b2b4b1cede0585e3d0c9e84201ec27b9905e4 |
|
MD5 | 62e7ae0638110cb4fad7b42b3166e2b7 |
|
BLAKE2b-256 | c750b0efb8bb66210da67a53ab95fd7a98826a97ee21f1d22949863e6d588b22 |
File details
Details for the file pywin32-308-cp313-cp313-win32.whl
.
File metadata
- Download URL: pywin32-308-cp313-cp313-win32.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.13, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c44539a37a5b7b21d02ab34e6a4d314e0788f1690d65b48e9b0b89f31abbbed |
|
MD5 | cab396af7bca6a9b533c48fb5b8f0835 |
|
BLAKE2b-256 | a9a4aa562d8935e3df5e49c161b427a3a2efad2ed4e9cf81c3de636f1fdddfd0 |
File details
Details for the file pywin32-308-cp312-cp312-win_arm64.whl
.
File metadata
- Download URL: pywin32-308-cp312-cp312-win_arm64.whl
- Upload date:
- Size: 8.0 MB
- Tags: CPython 3.12, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b4de86c8d909aed15b7011182c8cab38c8850de36e6afb1f0db22b8959e3091 |
|
MD5 | 27a571f2e5499f7a5f0fddd92c0c9498 |
|
BLAKE2b-256 | 9d0fd40f8373608caed2255781a3ad9a51d03a594a1248cd632d6a298daca693 |
File details
Details for the file pywin32-308-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: pywin32-308-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 6.5 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00b3e11ef09ede56c6a43c71f2d31857cf7c54b0ab6e78ac659497abd2834f47 |
|
MD5 | 2c85ba0f451d12a902909d745e397639 |
|
BLAKE2b-256 | 21270c8811fbc3ca188f93b5354e7c286eb91f80a53afa4e11007ef661afa746 |
File details
Details for the file pywin32-308-cp312-cp312-win32.whl
.
File metadata
- Download URL: pywin32-308-cp312-cp312-win32.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.12, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 587f3e19696f4bf96fde9d8a57cec74a57021ad5f204c9e627e15c33ff568897 |
|
MD5 | 1ffe70e16e2bf078e55d52dcc0f92cae |
|
BLAKE2b-256 | 007cd00d6bdd96de4344e06c4afbf218bc86b54436a94c01c71a8701f613aa56 |
File details
Details for the file pywin32-308-cp311-cp311-win_arm64.whl
.
File metadata
- Download URL: pywin32-308-cp311-cp311-win_arm64.whl
- Upload date:
- Size: 8.0 MB
- Tags: CPython 3.11, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 100a5442b7332070983c4cd03f2e906a5648a5104b8a7f50175f7906efd16bb6 |
|
MD5 | 15168dde0d17dd8465f4105c2e9e4f0f |
|
BLAKE2b-256 | 79ef68bb6aa865c5c9b11a35771329e95917b5559845bd75b65549407f9fc6b4 |
File details
Details for the file pywin32-308-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: pywin32-308-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 6.6 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 575621b90f0dc2695fec346b2d6302faebd4f0f45c05ea29404cefe35d89442b |
|
MD5 | 86b246615ffb751b8f14000be2beaeca |
|
BLAKE2b-256 | 48eff4fb45e2196bc7ffe09cad0542d9aff66b0e33f6c0954b43e49c33cad7bd |
File details
Details for the file pywin32-308-cp311-cp311-win32.whl
.
File metadata
- Download URL: pywin32-308-cp311-cp311-win32.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.11, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d8c8015b24a7d6855b1550d8e660d8daa09983c80e5daf89a273e5c6fb5095a |
|
MD5 | cb96fe1375e82f9a51f31f683ce53843 |
|
BLAKE2b-256 | ebe202652007469263fe1466e98439831d65d4ca80ea1a2df29abecedf7e47b7 |
File details
Details for the file pywin32-308-cp310-cp310-win_arm64.whl
.
File metadata
- Download URL: pywin32-308-cp310-cp310-win_arm64.whl
- Upload date:
- Size: 8.0 MB
- Tags: CPython 3.10, Windows ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5ab5381813b40f264fa3495b98af850098f814a25a63589a8e9eb12560f450c |
|
MD5 | 26e3d2dec494b607a6df1989288fa282 |
|
BLAKE2b-256 | 9f8ffb84ab789713f7c6feacaa08dad3ec8105b88ade8d1c4f0f0dfcaaa017d6 |
File details
Details for the file pywin32-308-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: pywin32-308-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 6.6 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fc888c59b3c0bef905ce7eb7e2106a07712015ea1c8234b703a088d46110e8e |
|
MD5 | fce1759266fa82f60deba18a6b3af5ac |
|
BLAKE2b-256 | d9b484e2463422f869b4b718f79eb7530a4c1693e96b8a4e5e968de38be4d2ba |
File details
Details for the file pywin32-308-cp310-cp310-win32.whl
.
File metadata
- Download URL: pywin32-308-cp310-cp310-win32.whl
- Upload date:
- Size: 5.9 MB
- Tags: CPython 3.10, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 796ff4426437896550d2981b9c2ac0ffd75238ad9ea2d3bfa67a1abd546d262e |
|
MD5 | c03f73ad40e4eae4a4901a7502217a5d |
|
BLAKE2b-256 | 72a63e9f2c474895c1bb61b11fa9640be00067b5c5b363c501ee9c3fa53aec01 |
File details
Details for the file pywin32-308-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: pywin32-308-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 6.6 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71b3322d949b4cc20776436a9c9ba0eeedcbc9c650daa536df63f0ff111bb920 |
|
MD5 | 7cdf2597a9747b25f2440f03fc9cbeda |
|
BLAKE2b-256 | e4cd0838c9a6063bff2e9bac2388ae36524c26c50288b5d7b6aebb6cdf8d375d |
File details
Details for the file pywin32-308-cp39-cp39-win32.whl
.
File metadata
- Download URL: pywin32-308-cp39-cp39-win32.whl
- Upload date:
- Size: 6.0 MB
- Tags: CPython 3.9, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7873ca4dc60ab3287919881a7d4f88baee4a6e639aa6962de25a98ba6b193341 |
|
MD5 | 5db8e4e596f4f46695980e1ef6f5754f |
|
BLAKE2b-256 | a841ead05a7657ffdbb1edabb954ab80825c4f87a3de0285d59f8290457f9016 |
File details
Details for the file pywin32-308-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: pywin32-308-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 6.6 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b92622e29d651c6b783e368ba7d6722b1634b8e70bd376fd7610fe1992e19de |
|
MD5 | 45e13d2214026d68b44b4b60b4422cf9 |
|
BLAKE2b-256 | b7e8729b049e3c5c5449049d6036edf7a24a6ba785a9a1d5f617b638a9b444eb |
File details
Details for the file pywin32-308-cp38-cp38-win32.whl
.
File metadata
- Download URL: pywin32-308-cp38-cp38-win32.whl
- Upload date:
- Size: 6.0 MB
- Tags: CPython 3.8, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5794e764ebcabf4ff08c555b31bd348c9025929371763b2183172ff4708152f0 |
|
MD5 | e9c6df294e04d4e18e860b7a50e5e74a |
|
BLAKE2b-256 | f30d2c464011689e11ff5d64a32337f37de463a0cb058e45de5ea4027b56601a |
File details
Details for the file pywin32-308-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: pywin32-308-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 6.6 MB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13dcb914ed4347019fbec6697a01a0aec61019c1046c2b905410d197856326a6 |
|
MD5 | c9f185e6e9dd4c7b28e9074b84b4d7c2 |
|
BLAKE2b-256 | 6952ac7037ec0eec0aa0a78ec4aab3d34227ea714b7fe5b578c5dca0af3d312f |
File details
Details for the file pywin32-308-cp37-cp37m-win32.whl
.
File metadata
- Download URL: pywin32-308-cp37-cp37m-win32.whl
- Upload date:
- Size: 6.0 MB
- Tags: CPython 3.7m, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f696ab352a2ddd63bd07430080dd598e6369152ea13a25ebcdd2f503a38f1ff |
|
MD5 | cd751b7cb866a24cc6ab83c4753e8c2c |
|
BLAKE2b-256 | 6c5d3f187cc1f7c7a249a98aaea41fa370cdf16bc6fae4746710661b33be2181 |