Select to view content in your preferred language

Blank Help with Interactive Python Window

3569
1
05-28-2015 04:02 PM
JoshuaBixby
MVP Esteemed Contributor

While interactively scripting in ArcGIS Desktop, I always noticed but couldn't figure out why most Python functions and methods would show something in the Python Help Window but not all functions and methods.  At first, I thought some functions and methods lacked docstrings, which would cause the Help Window to be blank, but I often found those functions and methods actually had docstrings.  It was a mystery but not one worth wasting time on.  Serendipitously, I stumbled into the answer while sorting something else out this week.

It turns out, the interactive Python Window doesn't properly show the __doc__ special attribute in the Help Window for Python classes or functions/methods within classes.  For example, let's look at arcpy.FromWKT:

arcgis_python_window_fromwkt_help.PNG

You can see that ArcGIS Desktop is displaying the __doc__ special attribute in the Python Help Window.  Now let's look at arcpy.Polygon:

arcgis_python_window_polygon_help.PNG

Although the __doc__ special attribute isn't overly verbose or detailed like with arcpy.FromWKT, there is nothing being displayed in the Python Help Window.  For the longest time, I couldn't figure out what differentiated the former from the latter.  The answer, Python classes.  arcpy.FromWKT is a function defined at the module level whereas arcpy.Polygon is a class.  Furthermore, for functions/methods defined within a class, the __doc__ special attribute isn't displayed either.

For ArcPy itself, the impact is noticeable, but whether it is significant or not is debatable.  The real issue arises because the interactive Python Window doesn't behave this way just for ArcPy but for all Python packages.  For example, look at the multiprocessing module:

arcgis_python_window_pool_help.PNG

For some Python packages, this bug/oversight has minimal impact, but there are other Python packages where a significant amount of useful documentation doesn't show up in the Python Help Window.

0 Kudos
1 Reply
JoshuaBixby
MVP Esteemed Contributor

Esri Support:

BUG-000088086:  Interactive Python Window doesn't display usage and tool-specific help in help window for all classes/functions

Now the real fun begins trying to get it fixed.