Skip to main content

Access selected win32 APIs through ctypes

Project description

logo ctwin32

winonly PyPI - Version PyPI - Python Version License - MIT PyPI - Stats


ctwin32 is a pure Python module, that wraps some Windows APIs (win32) by using ctypes. Since it is my personal playground, the selection of supported APIs and the way those are wrapped are solely dictated by my needs and preferences.

ctwin32 is definitely not a replacement for pywin32, although it serves that purpose for me (in conjunction with comtypes). Compared with pywin32 the coverage of ctwin32 is downright tiny.

While there is already another Python module that does something very similar to ctwin32 (pywin32-ctypes), it has a different purpose (namely to serve the internal needs of its creator).

See the samples directory for several instances of how ctwin32 can be used.


Note: Even though ctwin32 is a pure Python module, it can of course only be used on Windows. For the first three years or so, packages were tagged with the Windows platform tags to prevent pip from using them on other operating systems. However, it became futile to try to prevent this when after only one year the sdist package was also released. In the absence of suitable wheel packages for other operating systems, this would mean that pip install ctwin32 would now use the sdist package to install ctwin32 anyway. Therefore, a universal wheel is now distributed and it is up to the user to be smart enough to use it on Windows only.

Project details


Download files

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

Source Distribution

ctwin32-3.0.0.tar.gz (190.7 kB view details)

Uploaded Source

Built Distribution

ctwin32-3.0.0-py3-none-any.whl (154.7 kB view details)

Uploaded Python 3

File details

Details for the file ctwin32-3.0.0.tar.gz.

File metadata

  • Download URL: ctwin32-3.0.0.tar.gz
  • Upload date:
  • Size: 190.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.7

File hashes

Hashes for ctwin32-3.0.0.tar.gz
Algorithm Hash digest
SHA256 dca178fba150a0101107f0e50d92a42f836ccc3ad173b779402bcc7cd1f05b6a
MD5 cb12b88efc1e43587b5603bac86c4d4b
BLAKE2b-256 5afbc0cc69606dda946ccf29ec52b4d3e5f76d9a136c6f039107211f1e555566

See more details on using hashes here.

File details

Details for the file ctwin32-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: ctwin32-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 154.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.7

File hashes

Hashes for ctwin32-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c666780ca1294110099db84120103109921ba93d3412213b483e3efc5ff65f71
MD5 65461377b6e983ab51325ff7d2826e89
BLAKE2b-256 b91e669158fc889a06bf043745271d458d28e813af0812a5caa5274b64a244c4

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 Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page