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.

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.

So the question comes back around to being how is this same desired
behavior duplicated in the Python/C API?
.



Relevant Pages

  • Re: Why not a Python compiler?
    ... compilation by compiling to Common Lisp and using the CL's compiler to ... In order to correctly implement Python addition, ... Expressing simple loops as C for loops... ... optimization for a Python compiler are vague, ...
    (comp.lang.python)
  • Re: Python 3K or Python 2.9?
    ... function/method argument that might as well be hidden in the compiler ... You could add some syntax to Python such that '.x' was equivalent to ... def factory: ... C.method = foo ...
    (comp.lang.python)
  • Re: How does Ruby compare to Python?? How good is DESIGN of Rubycompared to Python?
    ... pure functional languages can prove facts about the code ... so in theory the compiler can optimize much more away. ... Python carries some extra baggage in each object. ... Haskell is a good pure-functional language to use as a comparison. ...
    (comp.lang.python)
  • Re: can anyone offer Lisp job?
    ... Look at how cool CMU's python compiler is and how ... CMU Python was actively being worked on, but I don't think it would show ... Lisp and the CMU Python compiler crushing ... ... You can't go challenging every world truth every ...
    (comp.lang.lisp)
  • Re: magic names in python
    ... They have no special meaning to the Python compiler. ... I don't consider magic in a programming language a bad thing. ... And it would appear we are working with the same definition as regarding methods: a magic name method is an identifier recognized by the compiler as a special case. ... I'm not contesting that some identifiers have special meaning or are treated differently under certain conditions. ...
    (comp.lang.python)