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
[email protected]
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to