Skip to main content

Ctypes made easy.

Project description

Simple function-wrapping API with ctypes.

Usage

Replace this:

prototype = ctypes.WINFUNCTYPE(wintypes.HANDLE, wintypes.UINT, wintypes.HANDLE)
paramflags = (1, "uFormat"), (1, "hMem")
SetClipboardData = prototype(("SetClipboardData", user32), paramflags)
SetClipboardData.errcheck = null_errcheck

With this:

SetClipboardData = pywrap.wrap_winapi(name="SetClipboardData",
                                        library=user32,
                                        restype=wintypes.BOOL,
                                        params=[
                                            Parameter("uFormat", wintypes.UINT),
                                            Parameter("hMem", wintypes.HANDLE)
                                        ],
                                        errcheck=null_errcheck)

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

pywrap-0.1.0.zip (4.5 kB view hashes)

Uploaded Source

Built Distribution

pywrap-0.1.0-py2.py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 2 Python 3

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