calling python functions from c

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • wesley henwood

    calling python functions from c

    The documentation for doing this can be found at:


    The only part I can't get is how to pass a pythong function object to a c
    function. How does one do this?

    _______________ _______________ _______________ _______________ _____
    Say “goodbye” to busy signals and slow downloads with a high-speed Internet
    connection! Prices start at less than $1 a day average.
    https://broadband.msn.com (Prices may vary by service area.)


  • Eric Brunel

    #2
    Re: calling python functions from c

    wesley henwood wrote:[color=blue]
    > The documentation for doing this can be found at:
    > http://www.python.org/doc/current/ex...ingPython.html
    >
    > The only part I can't get is how to pass a pythong function object to a
    > c function. How does one do this?[/color]

    I'm not sure I understand the question, since the document you give above *does*
    have a Python function passed to a C function. If you wonder what type to set
    for Python callbacks, it's just PyObject*: in Python, functions are just objects
    like every other ones, so they have the same C type.

    HTH
    --
    - Eric Brunel <eric dot brunel at pragmadev dot com> -
    PragmaDev : Real Time Software Development Tools - http://www.pragmadev.com

    Comment

    Working...