On Mon, Nov 5, 2012 at 9:31 AM, anatoly techtonik firstname.lastname@example.org 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:
- doesn't require compilation
- easier to maintain (no C/toolchain knowledge/ownership needed)
- pure Python is impossible to exploit (unlike pure C)
- 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 Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/fijall%40gmail.com
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).