[C++-sig] Re: boost::python docstrings
dholth at fastmail.fm
Mon Jul 14 06:21:33 CEST 2003
On Sun, 2003-07-13 at 16:17, David Abrahams wrote:
> There's so much information missing I doubt anyone is going to
> understand your question.
Whoops, sorry. Second try:
I'm working on a Python extension that controls xmms. It's written in
pure C++ and boost::python. This is an excerpt from 'pydoc xmms':
Python Library Documentation: module xmms
| Return the filename of a playlist item.
| Return length (milliseconds) of a playlist item
| Return the title of a playlist item.
This is an excerpt from 'pydoc urllib':
| get_user_passwd(self, host, realm, clear_cache=0)
| http_error_301(self, url, fp, errcode, errmsg, headers, data=None)
| Error 301 -- also relocated (permanently).
Notice how the Python module (urllib) has its argument list in the pydoc
documentation like so: get_user_passwd(self, host, realm,
clear_cache=0), while the boost::python module (or __builtins__, for
that matter) is presented as functionname(...).
My question: Is there an argument to .def() that will tell pydoc what
to put in place of the ... in e.g. get_playlist_file(...).
The alternative, taken by __builtins__, is to phrase the docstring as
methodcall(example) -> result
I'm also writing an xmms plugin, under the latest Debian Linux, i386,
that runs Python code but I get errors about internal Python symbols not
being found when I try to import other Python modules (like time). Can
someone point me to an existing project that includes a dynamically
loaded Python embedding?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
More information about the Cplusplus-sig