[Python-Dev] The os module, unix and win32
Thomas Heller
theller at python.net
Fri Jan 9 13:02:22 EST 2004
Guido van Rossum <guido at python.org> writes:
> If no C code existed, this all sounds great -- but don't underestimate
> its obscurity. For _winreg.c, I don't see a reason to switch. If
> it's missing something you'd like to see, please submit a patch to the
> C code.
I wasn't suggesting to replace the existing _winreg.c with ctypes, I
only wanted to demonstrate how ctypes code looks like, and took the
example that was posted before.
>> > I don't know enough about ctypes and its user community to answer that
>> > (I doubt I'd have much direct need for it myself). But in general I'm
>> > biased towards cross-platform tools.
>>
>> I had reports that it works on Solaris, Linux, MacOS, BSD. Maybe more
>> systems.
>>
>> The problem is that the non-windows version uses libffi, which is
>> difficult to find and install - it seems to be maintained now as part of
>> gcc, although the license is more BSD like.
>>
>> I would like to get rid of libffi - but the only multi-architecture
>> alternative I know of is Bruno Haible's ffcall (which is GPL).
>>
>> There *may* be other options (including writing assembly code).
>> Sam Rushing's calldll did this, AFAIK.
>>
>> And, remember: you can write bulletproof code with ctypes, but you can
>> also easily crash Python. Or other weird things.
>
> OK, never mind.
I don't understand this comment - what do you mean?
Thomas
More information about the Python-Dev
mailing list