Hrvoje Niksic <hnik...@xemacs.org> wrote:
>  Nick Craig-Wood <n...@craig-wood.com> writes:
> 
> > Here is a ctypes generator listdir for unix-like OSes.
> 
>  ctypes code scares me with its duplication of the contents of system
>  headers.  I understand its use as a proof of concept, or for hacks one
>  needs right now, but can anyone seriously propose using this kind of
>  code in a Python program?  For example, this seems much more
>  "Linux-only", or possibly even "32-bit-Linux-only", than
>  "unix-like":

It was a proof of concept certainly..

It can be done properly with gccxml though which converts structures
into ctypes definitions.

That said the dirent struct is specified by POSIX so if you get the
correct types for all the individual members then it should be correct
everywhere.  Maybe ;-)


-- 
Nick Craig-Wood <n...@craig-wood.com> -- http://www.craig-wood.com/nick
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to