Re: Function References



Ctypes is a since python2.5 built-in module that allows to declare
interfaces to C-libraries in pure python. You declare datatypes and
function prototypes, load a DLL/SO and then happily work with it. No C, no
compiler, no refcounts, no nothing.

And you can pass python-functions as callbacks.

squishywaffle@xxxxxxxxx wrote:

The first sentence (and some really crummy licensing restrictions
imposed by the library distributor) alone here excludes this as a
valid option for this particular case, I definitely need Python 2.4
support.

Perhaps all is not lost: ctypes works from Python 2.3 up. That first
sentence is saying that since Python 2.5 it has been included in the
standard Python distribution, but you can still download it separately.

-M-
.



Relevant Pages

  • Re: Function References
    ... interfaces to C-libraries in pure python. ... load a DLL/SO and then happily work with it. ... compiler, no refcounts, no nothing. ...
    (comp.lang.python)
  • Re: Why gmp is not in the standard library?
    ... re-engineering Python to use GMP numeric types ... including gmpy as a library in the standard Python distribution. ... Python at each release (the current gmpy developers perhaps) - thus I ...
    (comp.lang.python)
  • Re: Is a "real" C-Python possible?
    ... |I understand that the standard Python distribution is considered ... the current C-Python is really a combination ... | of C and Python implementation. ... | included in the Windows version of Python distribution. ...
    (comp.lang.python)
  • Re: ctypes 0.9.2 released
    ... I am wondering if it isn't time to push ctypes for inclusion ... > into the standard Python distribution. ... enhancements, and ctypes would be a huge enhancement to Python's stdlib. ...
    (comp.lang.python)
  • Re: python with braces pre-processor
    ... My problem is that the generic backend architecture ... be helpful if there were somewhere a python pre-processor that would take ... encounter more or less the same problem, but I didn't find any 'official' ... There's a tool in the standard Python distribution that processes code ...
    (comp.lang.python)