| Store | Cart

Re: [Python-Dev] ctypes is not an acceptable implementation strategy for modules in the standard library?

From: Maciej Fijalkowski <fij...@gmail.com>
Mon, 5 Nov 2012 15:38:23 +0200
On Mon, Nov 5, 2012 at 9:31 AM, anatoly techtonik <tech...@gmail.com> wrote:
> From http://bugs.python.org/issue16410> Subj?>> Aren't there any modules in stdlib that access system API through ctypes?>> My arguments for ctypes:> 1. doesn't require compilation> 2. easier to maintain (no C/toolchain knowledge/ownership needed)> 3. pure Python is impossible to exploit (unlike pure C)> 4. eating your own dogfood helps to make modules complete and notice> such silly/critical/timewasting/drivesmemad errors as> http://bugs.python.org/issue16376 a few years earlier>> Maybe it could even help to make ctypes faster (through some caching mechanizm).> --> anatoly t.> _______________________________________________> Python-Dev mailing list> Pyth...@python.org> http://mail.python.org/mailman/listinfo/python-dev> Unsubscribe: http://mail.python.org/mailman/options/python-dev/fijall%40gmail.com

Hi anatoly.

ctypes comes with it's own set of problems that manifest themselves
more or less depending what sort of libary have you tried to wrap.
Have you ever tried to use it seriously? The list of my personal
issues is available here:
http://morepypy.blogspot.com/2012/06/release-01-of-cffi.html

The main problem is API vs ABI and the robustness of checks.

I would not recommend using ctypes for any of the sdtlib (we actually
tried in pypy, it turned out a bit awful).

Cheers,
fijal
_______________________________________________
Python-Dev mailing list
Pyth...@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/python-dev-ml%40activestate.com

Recent Messages in this Thread
anatoly techtonik Nov 05, 2012 07:31 am
Ronald Oussoren Nov 05, 2012 09:32 am
Xavier Morel Nov 05, 2012 02:14 pm
Sturla Molden Nov 05, 2012 02:47 pm
Victor Stinner Nov 05, 2012 11:36 am
Trent Nelson Nov 06, 2012 02:35 pm
R. David Murray Nov 05, 2012 11:49 am
Maciej Fijalkowski Nov 05, 2012 01:38 pm
Messages in this thread