473,473 Members | 1,889 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help with boost::python and documentation tools (e.g. pydoc)

I'm using boost::python to transform various C++ classes and functions to
python. It is all working quite well, but now I'm having trouble with
documentation tools.

I hope someone can tell me if the problem is with the doc tools, such as
pydoc, or with boost::python implementation.

If I create a free function, this is what happens:
PyTypeObject function_type = {
PyObject_HEAD_INIT(0)
0,
"Boost.Python.function",
sizeof(function),
0,
(destructor)function_dealloc, /* tp_dealloc */
0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
0, /* tp_compare */
0, //(reprfunc)func_repr, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */
0, /* tp_as_mapping */
0, /* tp_hash */
function_call, /* tp_call */
0, /* tp_str */
0, // PyObject_GenericGetAttr, /* tp_getattro */
0, // PyObject_GenericSetAttr, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT /* | Py_TPFLAGS_HAVE_GC */,/* tp_flags */
0, /* tp_doc */
0, // (traverseproc)func_traverse, /* tp_traverse */
0, /* tp_clear */
0, /* tp_richcompare */
0, //offsetof(PyFunctionObject, func_weakreflist), /* tp_weaklistoffset
*/
0, /* tp_iter */
0, /* tp_iternext */
0, /* tp_methods */
0, // func_memberlist, /* tp_members */
function_getsetlist, /* tp_getset */
0, /* tp_base */
0, /* tp_dict */
function_descr_get, /* tp_descr_get */
0, /* tp_descr_set */
0, //offsetof(PyFunctionObject, func_dict), /* tp_dictoffset */
0, /* tp_init */
0, /* tp_alloc */
0,
0 /* tp_new */
};

Notice the getset member is being set, so I guess this is using the new
descriptor protocol.

As an example:

dir (block_interleaver_wrap)
['__doc__', '__file__', '__name__', 'block_interleaver', 'deinterleave',
'deinterleave_c', 'interleave', 'interleave_c']

the latter 4 are free functions. If I use pydoc, these functions don't
appear.

inspect.ismethoddescriptor(block_interleaver_wrap. interleave)
True

inspect.getdoc (block_interleaver_wrap.interleave)
'interleave(inter,x)\nInterleave input I{x} using interleaver I{inter}@param
inter: stuff'

This is the documentation I wanted.

Anyone know what needs to happen so that tools like pydoc, and especially
epydoc, will correctly find the documentation?
Jul 18 '05 #1
0 1253

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Colin J. Williams | last post by:
I am building a module which is based on the numarray package and its sub-packages. I am proposing to use PyDoc to document this module. The problem is that PyDoc generates links to...
0
by: Markus L. | last post by:
Hi, I am the developer of an open source PHP framework. I like programming but I don't like documentation, so my programms are poorly documented. I need one or more people which want to help me...
0
by: Manuel Lopez | last post by:
Here's a simple question: how do I download or print out the entire documentation (or a large chunk) in readable format (doc or pdf)? It's not of much use to me if I have to go to every separate...
2
by: Brad Markisohn | last post by:
Are there any 3rd party documentation tools for .Net? I remember using Document!VB for VB 6.0 code, but I wasn't sure if there are any products like these for .Net. Brad
10
by: Frank | last post by:
I have install VB.net 2003 twice. I still cannot get the help or the documentation to work! Thank you
0
by: Raymond via DotNetMonster.com | last post by:
Hey ppl Do you know of any FREE tools that generate documentation for .NET projects built under VS 2005 + .Net framework 2.0? I was using Ndoc however I upgraded to VS 2005 and I think that the...
6
by: JC | last post by:
I like your opinions about the best way of documenting the code in Csharp. To my particularly I like the solution given in VST 2000 but that they (Microsoft) removed of 2005. That you think...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.