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-310-cp313-cp313-win_arm64.whl (8.5 MB view details)

Uploaded CPython 3.13 Windows ARM64

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

Uploaded CPython 3.13 Windows x86-64

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

Uploaded CPython 3.13 Windows x86

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

Uploaded CPython 3.12 Windows ARM64

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

Uploaded CPython 3.12 Windows x86-64

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

Uploaded CPython 3.12 Windows x86

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

Uploaded CPython 3.11 Windows ARM64

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

Uploaded CPython 3.11 Windows x86-64

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

Uploaded CPython 3.11 Windows x86

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

Uploaded CPython 3.10 Windows ARM64

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

Uploaded CPython 3.10 Windows x86-64

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

Uploaded CPython 3.10 Windows x86

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

Uploaded CPython 3.9 Windows x86-64

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

Uploaded CPython 3.9 Windows x86

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

Uploaded CPython 3.8 Windows x86-64

pywin32-310-cp38-cp38-win32.whl (8.9 MB view details)

Uploaded CPython 3.8 Windows x86

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp313-cp313-win_arm64.whl
Algorithm Hash digest
SHA256 e308f831de771482b7cf692a1f308f8fca701b2d8f9dde6cc440c7da17e47b33
MD5 e86d2b39cf7e73486f9ecc638667f29d
BLAKE2b-256 b4f4f785020090fb050e7fb6d34b780f2231f302609dc964672f72bfaeb59a28

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 667827eb3a90208ddbdcc9e860c81bde63a135710e21e4cb3348968e4bd5249e
MD5 8ed07653bc9fb3af54ee39cc11488835
BLAKE2b-256 453cb4640f740ffebadd5d34df35fecba0e1cfef8fde9f3e594df91c28ad9b50

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 5d241a659c496ada3253cd01cfaa779b048e90ce4b2b38cd44168ad555ce74ab
MD5 5ca7846b438fdd1a50bfd6d6f15e3653
BLAKE2b-256 1c099c1b978ffc4ae53999e89c19c77ba882d9fce476729f23ef55211ea1c034

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp312-cp312-win_arm64.whl
Algorithm Hash digest
SHA256 2349cc906eae872d0663d4d6290d13b90621eaf78964bb1578632ff20e152966
MD5 a841f9b650e87a918e337c85aa24c022
BLAKE2b-256 1f329ccf53748df72301a89713936645a664ec001abd35ecc8578beda593d37d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 bf5c397c9a9a19a6f62f3fb821fbf36cac08f03770056711f765ec1503972060
MD5 2e6589e406505f0902a1ccd0ea171c11
BLAKE2b-256 e3e5b0627f8bb84e06991bea89ad8153a9e50ace40b2e1195d68e9dff6b03d0f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 8a75a5cc3893e83a108c05d82198880704c44bbaee4d06e442e471d3c9ea4f3d
MD5 89b3e039796f056aee7ae415c4574459
BLAKE2b-256 6bec4fdbe47932f671d6e348474ea35ed94227fb5df56a7c30cbbb42cd396ed0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 19ec5fc9b1d51c4350be7bb00760ffce46e6c95eaf2f0b2f1150657b1a43c582
MD5 d05cb2360f85ac3d1f2b6cfb71f82c07
BLAKE2b-256 90b1ac8b1ffce6603849eb45a91cf126c0fa5431f186c2e768bf56889c46f51c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 126298077a9d7c95c53823934f000599f66ec9296b09167810eb24875f32689c
MD5 801e50bdd3e62959c352c5cc0b1083d8
BLAKE2b-256 b3bdd1592635992dd8db5bb8ace0551bc3a769de1ac8850200cfa517e72739fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 1e765f9564e83011a63321bb9d27ec456a0ed90d3732c4b2e312b855365ed8bd
MD5 5c8854aef2db1030325b8088b462bdad
BLAKE2b-256 f7b168aa2986129fb1011dabbe95f0136f44509afaf072b12b8f815905a39f33

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp310-cp310-win_arm64.whl
Algorithm Hash digest
SHA256 33babed0cf0c92a6f94cc6cc13546ab24ee13e3e800e61ed87609ab91e4c8213
MD5 ce624b3d6eb211965645ba4dad10fce4
BLAKE2b-256 3c841a8e3d7a15490d28a5d816efa229ecb4999cdc51a7c30dd8914f669093b8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c3e78706e4229b915a0821941a84e7ef420bf2b77e08c9dae3c76fd03fd2ae3d
MD5 c315abbf14eb2c713f17e45ad75dcf67
BLAKE2b-256 aafed873a773324fa565619ba555a82c9dabd677301720f3660a731a5d07e49a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 6dd97011efc8bf51d6793a82292419eba2c71cf8e7250cfac03bba284454abc1
MD5 bd17f6a9bcf9acf55130a45594eb775c
BLAKE2b-256 95daa5f38fffbba2fb99aa4aa905480ac4b8e83ca486659ac8c95bce47fb5276

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 96867217335559ac619f00ad70e513c0fcf84b8a3af9fc2bba3b59b97da70475
MD5 4362bafa167368a4c2807f0217e48549
BLAKE2b-256 93ff2a8c10315ffbdee7b3883ac0d1667e267ca8b3f6f640d81d43b87a82c0c7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 851c8d927af0d879221e616ae1f66145253537bbdd321a77e8ef701b443a9a1a
MD5 14bf3265c5ba3f435a892aaba6f6c5ab
BLAKE2b-256 a2cdd09d434630edb6a0c44ad5079611279a67530296cfe0451e003de7f449ff

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-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-310-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 30f0a9b3138fb5e07eb4973b7077e1883f558e40c578c6925acc7a94c34eaa36
MD5 74c279d1589ddfc055221003edf0dd2a
BLAKE2b-256 0c3b05f848971b3a44b35cd48ea0c6c648745be8bc5a3fc9f4df6f135c7f1e07

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywin32-310-cp38-cp38-win32.whl
  • Upload date:
  • Size: 8.9 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-310-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 0867beb8addefa2e3979d4084352e4ac6e991ca45373390775f7084cc0209b9c
MD5 4e44f8f71768bcd9515b65619b24f002
BLAKE2b-256 46659c5b79424e344b976394f2b1bb4bedfa4cd013143b72b301a66e4b8943fe

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