Re: Function References



squishywaffle@xxxxxxxxx wrote:

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.

How much more liberal can it get than MIT-licensed?

"""
to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
"""

But then, if you insist, go down the hard road.

Diez

.



Relevant Pages

  • Re: Function References
    ... interfaces to C-libraries in pure python. ... load a DLL/SO and then happily work with it. ... The first sentence (and some really crummy licensing restrictions ... The above copyright notice and this permission notice shall be ...
    (comp.lang.python)
  • 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 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)