[PySide] Shiboken - Documentation support when binding a C++ library

John Cummings jcummings2 at users.sf.net
Fri Jun 1 22:09:09 CEST 2012


Yann Lanthony <yann.lanthony at ...> writes:

> 
> 
> Hi everyone,
> 
> 
> I am new to this list, so first of all thanks for your work ! PySide and 
shiboken are such great tools.
> Actually, I had already created a post in the PySide googlegroups but if I get 
it right, here is a better place to ask questions :)
> 
> 
> So, I am currently using shiboken to do the python binding of my C++ Qt-based 
project. I am starting to get really nice results, as I'm now able to end up 
with a .pyd file that allows me to call my C++ functions within a python 
interpreter. 
> However, I have trouble understanding how I can also retrieve my C++ doxygen-
style documentation as python docstrings, to be able to print functions doc at 
runtime with help(myFunction).
> I am working on Windows (64bits) and I have compiled shiboken (and pyside) 
with docstring support (well, I linked libxml2 and libxslt which seem to be the 
2 documentation related libraries). 
> 
> 
> Is it at least possible to do something like that with the current version of 
shiboken (1.1.1) ?
> 
> 
> 
> Many thanks,
> 
> Yann
> 



I second this request for information about docstrings. Like Yann, I have 
libxml2 and libxslt installed and I left DISABLE_DOCSTRINGS set to OFF. I also 
have sphinx installed, which I think may be necessary for the docstrings to 
work.

I did see that the sphinxtabletest has been commented out in the 
shiboken/tests/CMakeLists.txt file. I managed to get to compile and run 
successfully by compiling in all the files from the generator CMakeLists.txt 
except for main.cpp.The working test makes me think my sphinx setup is correct.

I could understand my doxygen strings not working but the "<insert-
documentation>" tags from pyside itself working.

So, what are Yann and I missing?

For what it is worth, I am on 64-bit Linux with gcc 4.6.2.

Thank you
John Cummings





More information about the PySide mailing list