GUIs - A Modest Proposal

Stephen Hansen me+list/python at ixokai.io
Sun Jun 13 02:35:06 EDT 2010


On 6/12/10 8:22 PM, Gregory Ewing wrote:
> Terry Reedy wrote:
> 
>> Would it be possible to write a program that converts a module that
>> uses ctypes to interface to a dll to a corresponding C extension
>> program that would compile to a drop in replacement extension module?
> 
> Probably, but I don't see how that could be done automatically
> in a way that ensured the result would be any safer than the
> original ctypes-using version. If you preserve the semantics of
> the Python code, you also preserve any bugs it might have.

I dunno. This is exactly what Cython does. I have exactly one extension
module in Cython that uses it, and so very limited experience-- but it
seems very solid and very safe, from my admittedly limited attempts at
breaking it.

True, Cython != Python. But its close enough that Python programmers can
do it without knowing the pain of C, just following a certain limited
Python subset. Its very doable, very accessible, and *seems* to address
this very issue.

-- 

   Stephen Hansen
   ... Also: Ixokai
   ... Mail: me+list/python (AT) ixokai (DOT) io
   ... Blog: http://meh.ixokai.io/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 487 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20100612/b36d9cda/attachment-0001.sig>


More information about the Python-list mailing list