c/c++ extensions and help()

L

Lenny G.

Is there a way to make a c/c++ extension have a useful method
signature? Right now, help(myCFunc) shows up like:

myCFunc(...)
description of myCFunc

I'd like to be able to see:

myCFunc(myArg1, myArg2)
description of myCFunc


Is this currently possible?

Thanks,
Lenny G.
 
R

Robert Kern

Lenny said:
Is there a way to make a c/c++ extension have a useful method
signature? Right now, help(myCFunc) shows up like:

myCFunc(...)
description of myCFunc

I'd like to be able to see:

myCFunc(myArg1, myArg2)
description of myCFunc

Is this currently possible?

There really isn't a way to let the inspect module know about extension
function arguments. Just put it in the docstring.

--
Robert Kern
(e-mail address removed)

"In the fields of hell where the grass grows high
Are the graves of dreams allowed to die."
-- Richard Harter
 
P

Philip Austin

Robert Kern said:
There really isn't a way to let the inspect module know about
extension function arguments. Just put it in the docstring.

The next release of boost.python should do this automatically:

(http://mail.python.org/pipermail/c++-sig/2005-July/009243.html)


Help on built-in function lcm:

lcm(...)
C++ signature:
lcm(int, int) -> int

Help on method numerator:

numerator(...) method of boost_rational_ext.int instance
C++ signature:
numerator(boost::rational<int> {lvalue}) -> int


Regards, Phil
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top