[C++-sig] More on documenting boost::python

Neal D. Becker ndbecker2 at verizon.net
Thu Sep 30 13:10:20 CEST 2004


I am trying to use epydoc with boost::python.  It is almost working now, but
I have one problem.  Free function docs don't show up.  It seems to be
related to the fact that they also don't show up in python "help".  For
example, notice that the function "interleave" shows up in dir(<module>),
and if I explicitly ask for help on the function, but not in
help(<module>).  Anyone ideas?

>>> import block_interleaver_wrap
>>> dir (block_interleaver_wrap)
['__doc__', '__file__', '__name__', 'block_interleaver', 'deinterleave',
'deinterleave_c', 'interleave', 'interleave_c']
>>> help (block_interleaver_wrap)
Help on module block_interleaver_wrap:

NAME
    block_interleaver_wrap - Module for Block Interleavers

FILE
    /disk1/nbecker/shannon2/wrap/block_interleaver_wrap.so

CLASSES
    Boost.Python.instance(__builtin__.object)
        block_interleaver
    
    class block_interleaver(Boost.Python.instance)
     |  Block Interleaver
     |  
     |  Method resolution order:
     |      block_interleaver
     |      Boost.Python.instance
     |      __builtin__.object
     |  
     |  Methods defined here:
     |  
     |  __init__(...)
     |      __init__(size,rows,cols)
     |      Construct a Block Interleaver.
     |      Only full arrays are supported.
     |      @param size: array size
     |      @type size: int
     |      @param rows: rows
     |      @type rows: int
     |      @param cols: cols
     |      @type cols: int
     |  
     |  v(...)
     |  
     |  vinv(...)
     |  
     | 
----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |  
     |  __instance_size__ = 44
     |  
     | 
----------------------------------------------------------------------
     |  Data and other attributes inherited from Boost.Python.instance:
     |  
     |  __dict__ = <dictproxy object>
     |  
     |  __new__ = <built-in method __new__ of Boost.Python.class object>
     |      T.__new__(S, ...) -> a new object with type S, a subtype of T
     |  
     |  __weakref__ = <member '__weakref__' of 'Boost.Python.instance'
objects...


>>> help (block_interleaver_wrap.interleave)
Help on function:

interleave(...)
    interleave(inter,x)
    Interleave input I{x} using interleaver I{inter}@param inter: stuff






More information about the Cplusplus-sig mailing list