Skip to main content

Python for Window Extensions

Project description

pywin32

CI PyPI - Version PyPI - Python Version PyPI - Downloads License - PSF-2.0


This is the readme for the Python for Win32 (pywin32) extensions, which provides access to many of the Windows APIs from Python, including COM support.

See CHANGES.txt for recent notable changes.

adodbapi's documentation can be found in: adodbapi/readme.txt

isapi's documentation can be found in: isapi/README.txt

Docs

The docs are a long and sad story, but there's now an online version of the PyWin32.chm helpfile (thanks @ofek!). Lots of that is very old, but some is auto-generated and current. Would love help untangling the docs!

You can get type hints, signatures and annotations from types-pywin32.

Support

Feel free to open issues for all bugs (or suspected bugs) in pywin32. pull-requests for all bugs or features are also welcome.

Type stubs currently live in typeshed. Any issue or request related to static type-checking and IntelliSense should be raised there.

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 -m pywin32_postinstall -install

or (shorter but you don't have control over which python environment is used)

pywin32_postinstall -install

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)

Installing for MingGW/msys2

The folks at https://github.com/msys2/MINGW-packages/tree/master/mingw-w64-python-pywin32 are graciously keeping an updated set of patches to install pywin32 for MingGW/msys2.

We'd suggest installing from https://packages.msys2.org/base/mingw-w64-python-pywin32 pacman -S mingw-w64-python-pywin32.

We're open to seeing these patches be upstreamed in pywin32 if they can be tested automatically on the CI.

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 was previously run. So you should run it again:

    python -m pywin32_postinstall -install
    

    or (shorter but you don't have control over which python environment is used)

    pywin32_postinstall -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 and pythoncomXX.dll (where XX 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.

Then follow the Build instructions for the build itself (including ARM64 cross-compilation).

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 via py -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 via py -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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

pywin32-309-cp313-cp313-win_arm64.whl (8.5 MB view details)

Uploaded CPython 3.13 Windows ARM64

pywin32-309-cp313-cp313-win_amd64.whl (9.5 MB view details)

Uploaded CPython 3.13 Windows x86-64

pywin32-309-cp313-cp313-win32.whl (8.8 MB view details)

Uploaded CPython 3.13 Windows x86

pywin32-309-cp312-cp312-win_arm64.whl (8.5 MB view details)

Uploaded CPython 3.12 Windows ARM64

pywin32-309-cp312-cp312-win_amd64.whl (9.5 MB view details)

Uploaded CPython 3.12 Windows x86-64

pywin32-309-cp312-cp312-win32.whl (8.8 MB view details)

Uploaded CPython 3.12 Windows x86

pywin32-309-cp311-cp311-win_arm64.whl (8.5 MB view details)

Uploaded CPython 3.11 Windows ARM64

pywin32-309-cp311-cp311-win_amd64.whl (9.5 MB view details)

Uploaded CPython 3.11 Windows x86-64

pywin32-309-cp311-cp311-win32.whl (8.8 MB view details)

Uploaded CPython 3.11 Windows x86

pywin32-309-cp310-cp310-win_arm64.whl (8.5 MB view details)

Uploaded CPython 3.10 Windows ARM64

pywin32-309-cp310-cp310-win_amd64.whl (9.6 MB view details)

Uploaded CPython 3.10 Windows x86-64

pywin32-309-cp310-cp310-win32.whl (8.8 MB view details)

Uploaded CPython 3.10 Windows x86

pywin32-309-cp39-cp39-win_amd64.whl (9.6 MB view details)

Uploaded CPython 3.9 Windows x86-64

pywin32-309-cp39-cp39-win32.whl (8.8 MB view details)

Uploaded CPython 3.9 Windows x86

pywin32-309-cp38-cp38-win_amd64.whl (9.6 MB view details)

Uploaded CPython 3.8 Windows x86-64

pywin32-309-cp38-cp38-win32.whl (8.8 MB view details)

Uploaded CPython 3.8 Windows x86

File details

Details for the file pywin32-309-cp313-cp313-win_arm64.whl.

File metadata

  • Download URL: pywin32-309-cp313-cp313-win_arm64.whl
  • Upload date:
  • Size: 8.5 MB
  • Tags: CPython 3.13, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp313-cp313-win_arm64.whl
Algorithm Hash digest
SHA256 8fd9669cfd41863b688a1bc9b1d4d2d76fd4ba2128be50a70b0ea66b8d37953b
MD5 69c7fd4590dc0e996e34e94f9caa6253
BLAKE2b-256 2c849a51e6949a03f25cd329ece54dbf0846d57fadd2e79046c3b8d140aaa132

See more details on using hashes here.

File details

Details for the file pywin32-309-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pywin32-309-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 9.5 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 bd0724f58492db4cbfbeb1fcd606495205aa119370c0ddc4f70e5771a3ab768d
MD5 b048acd3c6074a93c92d029f4e81d95e
BLAKE2b-256 dd66330f265140fa814b4ed1bf16aea701f9d005f8f4ab57a54feb17f53afe7e

See more details on using hashes here.

File details

Details for the file pywin32-309-cp313-cp313-win32.whl.

File metadata

  • Download URL: pywin32-309-cp313-cp313-win32.whl
  • Upload date:
  • Size: 8.8 MB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 008bffd4afd6de8ca46c6486085414cc898263a21a63c7f860d54c9d02b45c8d
MD5 e139b8fafe9a861bdc9a41b0ef242917
BLAKE2b-256 6cc351aca6887cc5e410aa4cdc55662cf8438212440c67335c3f141b02eb8d52

See more details on using hashes here.

File details

Details for the file pywin32-309-cp312-cp312-win_arm64.whl.

File metadata

  • Download URL: pywin32-309-cp312-cp312-win_arm64.whl
  • Upload date:
  • Size: 8.5 MB
  • Tags: CPython 3.12, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp312-cp312-win_arm64.whl
Algorithm Hash digest
SHA256 619f3e0a327b5418d833f44dc87859523635cf339f86071cc65a13c07be3110f
MD5 b73299aa13c6cc042f923e3b2ee3df28
BLAKE2b-256 189f79703972958f8ba3fd38bc9bf1165810bd75124982419b0cc433a2894d46

See more details on using hashes here.

File details

Details for the file pywin32-309-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pywin32-309-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 9.5 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6ff9eebb77ffc3d59812c68db33c0a7817e1337e3537859499bd27586330fc9e
MD5 345fbfcb2ba6486c623ba9301859a2a9
BLAKE2b-256 dd11c36884c732e2b3397deee808b5dac1abbb170ec37f94c6606fcb04d1e9d7

See more details on using hashes here.

File details

Details for the file pywin32-309-cp312-cp312-win32.whl.

File metadata

  • Download URL: pywin32-309-cp312-cp312-win32.whl
  • Upload date:
  • Size: 8.8 MB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 de9acacced5fa82f557298b1fed5fef7bd49beee04190f68e1e4783fbdc19926
MD5 682772cab8e9ed8fcc3ad06537c00326
BLAKE2b-256 202cb0240b14ff3dba7a8a7122dc9bbf7fbd21ed0e8b57c109633675b5d1761f

See more details on using hashes here.

File details

Details for the file pywin32-309-cp311-cp311-win_arm64.whl.

File metadata

  • Download URL: pywin32-309-cp311-cp311-win_arm64.whl
  • Upload date:
  • Size: 8.5 MB
  • Tags: CPython 3.11, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 54ee296f6d11db1627216e9b4d4c3231856ed2d9f194c82f26c6cb5650163f4c
MD5 f89658bc948f8ca07b38ab8e241cf1eb
BLAKE2b-256 7a4b1f5e377a04448cf410e13040bc0e4c408bfa0a65705cabf96904178f18df

See more details on using hashes here.

File details

Details for the file pywin32-309-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pywin32-309-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 9.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e7ec2cef6df0926f8a89fd64959eba591a1eeaf0258082065f7bdbe2121228db
MD5 e9eafb165512751ee7f1fb7740fd76ad
BLAKE2b-256 6af0ae8ddb56771093dd2905baa852958fd65d42a8972aeefcf13578dfae69f4

See more details on using hashes here.

File details

Details for the file pywin32-309-cp311-cp311-win32.whl.

File metadata

  • Download URL: pywin32-309-cp311-cp311-win32.whl
  • Upload date:
  • Size: 8.8 MB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 d5df6faa32b868baf9ade7c9b25337fa5eced28eb1ab89082c8dae9c48e4cd51
MD5 94ff26145c16186418cec4b583740893
BLAKE2b-256 05546409b1d98f2b8fed3bc2cc854859e48ae4a2dd956176664e38ee49c50a4c

See more details on using hashes here.

File details

Details for the file pywin32-309-cp310-cp310-win_arm64.whl.

File metadata

  • Download URL: pywin32-309-cp310-cp310-win_arm64.whl
  • Upload date:
  • Size: 8.5 MB
  • Tags: CPython 3.10, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp310-cp310-win_arm64.whl
Algorithm Hash digest
SHA256 c667bcc0a1e6acaca8984eb3e2b6e42696fc035015f99ff8bc6c3db4c09a466a
MD5 4ce11d5d8317a3129379f960f8a55677
BLAKE2b-256 1ecaeffaf45448a988f9a3ef5bb78519632761b9d941a3421c99d8a0a35ed8a2

See more details on using hashes here.

File details

Details for the file pywin32-309-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pywin32-309-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 9.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 728d08046f3d65b90d4c77f71b6fbb551699e2005cc31bbffd1febd6a08aa698
MD5 5d62ef7cb0b71034491aadfd1f044d05
BLAKE2b-256 6353a568b1501e52363edf02db1ae3d3880d5307c7451dd31fb4f380b968b3c1

See more details on using hashes here.

File details

Details for the file pywin32-309-cp310-cp310-win32.whl.

File metadata

  • Download URL: pywin32-309-cp310-cp310-win32.whl
  • Upload date:
  • Size: 8.8 MB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 5b78d98550ca093a6fe7ab6d71733fbc886e2af9d4876d935e7f6e1cd6577ac9
MD5 3049ed6b823a9b1140aa37a27b09a077
BLAKE2b-256 8cfaaeba8c29ef8cb83402a6f2e6c436d7cc705d79d22db7923704bb6f6af825

See more details on using hashes here.

File details

Details for the file pywin32-309-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pywin32-309-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 9.6 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 88bc06d6a9feac70783de64089324568ecbc65866e2ab318eab35da3811fd7ef
MD5 061ce9e3c03b795b2f1b2118056fb25d
BLAKE2b-256 89a5390fbc106b5998296515d5a88730c6de472a6ed5f051db66d4cc46dd50fd

See more details on using hashes here.

File details

Details for the file pywin32-309-cp39-cp39-win32.whl.

File metadata

  • Download URL: pywin32-309-cp39-cp39-win32.whl
  • Upload date:
  • Size: 8.8 MB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 72ae9ae3a7a6473223589a1621f9001fe802d59ed227fd6a8503c9af67c1d5f4
MD5 893f781ada0a8ab1d9edbf1f385e3222
BLAKE2b-256 80a29c0c9bda69e5064b616d4484624e097c13b2a2dfffe601609a1cb8e68ba1

See more details on using hashes here.

File details

Details for the file pywin32-309-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pywin32-309-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 9.6 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 0be3071f555480fbfd86a816a1a773880ee655bf186aa2931860dbb44e8424f8
MD5 6e1e33a0b28e0296d0730fa7b96fdc09
BLAKE2b-256 7839eee3a49ac87881277f43506e9391ec27f00ff403a6e060a68b23e540d38a

See more details on using hashes here.

File details

Details for the file pywin32-309-cp38-cp38-win32.whl.

File metadata

  • Download URL: pywin32-309-cp38-cp38-win32.whl
  • Upload date:
  • Size: 8.8 MB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.3

File hashes

Hashes for pywin32-309-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 617b837dc5d9dfa7e156dbfa7d3906c009a2881849a80a9ae7519f3dd8c6cb86
MD5 a53d765959c66b3ab253689c3b102d6c
BLAKE2b-256 1de701fbb5f8c7be6403d71dc6793360d2af6f759b4a9a389c5bb9c30bf69d4f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page