Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > c/c++ extensions and help()

Reply
Thread Tools

c/c++ extensions and help()

 
 
Lenny G.
Guest
Posts: n/a
 
      07-28-2005
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.

 
Reply With Quote
 
 
 
 
Robert Kern
Guest
Posts: n/a
 
      07-28-2005
Lenny G. wrote:
> 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
http://www.velocityreviews.com/forums/(E-Mail Removed)

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

 
Reply With Quote
 
 
 
 
Philip Austin
Guest
Posts: n/a
 
      07-31-2005
Robert Kern <(E-Mail Removed)> writes:

> Lenny G. wrote:
>> 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.
>


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

(http://mail.python.org/pipermail/c++...ly/009243.html)


>>> help(rational.lcm)


Help on built-in function lcm:

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

>>> help(rational.int().numerator)


Help on method numerator:

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


Regards, Phil
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox 2 and broken extensions and themes GraB NZ Computing 1 12-03-2006 05:57 PM
Unable to access extensions menu or add extensions (I've tried past suggestions) nospam@spam.com Firefox 8 12-01-2005 01:33 AM
Error after updating Firefox themes and extensions Christine Marie Firefox 1 10-25-2004 11:07 PM
Really get sick and tired of this. Themes and extensions DON'T install??!!! Galaxy Firefox 8 07-03-2004 11:55 PM
Mozilla, Quicktime, and file extensions Matt O'Toole Firefox 0 12-07-2003 08:47 PM



Advertisments