[Python-ideas] Wrapper for ctypes
Ryan Gonzalez
rymg19 at gmail.com
Tue Mar 7 10:13:42 EST 2017
Ever looked up cffi? You won't be disappointed.
--
Ryan (ライアン)
Yoko Shimomura > ryo (supercell/EGOIST) > Hiroyuki Sawano >> everyone else
http://refi64.com
On Mar 7, 2017 3:43 AM, "George Fischhof" <george at fischhof.hu> wrote:
> Hi Guys,
>
> right now I had to call functions from a dll, and I started using ctypes.
>
>
> I found this library too
>
> https://pypi.python.org/pypi/pywrap/0.1.0
>
> which says (qutation):
>
> 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)
>
>
>
> (end qutation)
>
> My idea: something like this library should be implemented in Python to make it more simple to use ctypes.
>
> BR,
>
> George
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170307/2744d025/attachment.html>
More information about the Python-ideas
mailing list