[C++-sig] inspect module and Boost.Python.function

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Thu Apr 21 17:40:00 CEST 2011


You can use

help(your_function)

to get information about the arguments.

The signature with default arguments is in the docstring (unless you
turn this feature off).

Boost.Python supports overloads; the inspect module is not aware of
this.

Ralf


To: cplusplus-sig at python.org
>Sent: Thursday, April 21, 2011 6:48 AM
>Subject: Re: [C++-sig] inspect module and Boost.Python.function
>
>
>Hi all,
>
>I would like to get a list of the arguments of some Boost Python functions in a python program.
>So, I was thinking of using the inspect module and the getargspec function.
>However, I get an error: "arg is not a Python function".
>I'm using python 2.6 and boost python 1.42.
>
>Is it possible to combine inspect and boost python function ?
>Is there a way to get the arguments of a Boost Python function in a python program ?
>
>Thanks,
>
>Jean Felder
>
>_______________________________________________
>Cplusplus-sig mailing list
>Cplusplus-sig at python.org
>http://mail.python.org/mailman/listinfo/cplusplus-sig
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20110421/1ab9dd4d/attachment.html>


More information about the Cplusplus-sig mailing list