<p dir="ltr">You won't be able to get the doc strings like that in 2.x as we never included them in the sip files meaning they are never exposed to Python.  The automatic sip generation which also includes docs string is only for 3.x.</p>
<p dir="ltr">Nathan</p>
<br><div class="gmail_quote"><div dir="ltr">On Tue, 20 Jun 2017, 7:31 AM Kevin Stadler <<a href="mailto:e0425926@student.tuwien.ac.at">e0425926@student.tuwien.ac.at</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I'm trying to access the docstrings of various QGIS 2.* components<br>
from the IPython console, but instead of the actual documentation I<br>
only seem to get dummy docstrings generated by SIP:<br>
<br>
>>> QgsMapLayerRegistry.instance().mapLayers.__doc__<br>
'mapLayers(self) -> object'<br>
<br>
>>> QgsMapLayerRegistry.instance().mapLayer.__doc__<br>
'mapLayer(self, QString) -> QgsMapLayer'<br>
<br>
>>> QgsVectorLayer.__doc__<br>
'QgsVectorLayer(path: QString = QString.null, baseName: QString =<br>
QString.null, providerLib: QString = QString.null,<br>
loadDefaultStyleFlag: bool = True)'<br>
<br>
Using help(...) instead of .__doc__ doesn't look much different. Is<br>
this just something wrong with my build (from the Fedora stable<br>
repository), can somebody reproduce this on a non-Linux build?<br>
<br>
I've looked through the mailing list archive but haven't found<br>
anything conclusive. The flag to have SIP generate docstrings<br>
requested here is still enabled:<br>
<a href="http://osgeo-org.1560.x6.nabble.com/Sip-flag-to-generate-docstrings-td4485370.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/Sip-flag-to-generate-docstrings-td4485370.html</a><br>
<br>
I'm thinking it might have to do with the new SIP file generation<br>
workflow described here:<br>
<a href="http://osgeo-org.1560.x6.nabble.com/automatic-sip-files-generation-td5314970.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.nabble.com/automatic-sip-files-generation-td5314970.html</a><br>
although I'm not clear on which branch this actually applies to (and<br>
whether it might be the source or the solution of my problem)?<br>
<br>
Best,<br>
Kevin<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a></blockquote></div>