Python Report.tbx - Report Python environment

1834
3
05-21-2016 11:18 PM

Python Report.tbx - Report Python environment

This toolbox contains a single model that prints diagnostics of the current Python environment. If your Python tool run from Desktop is not doing what you want it to, this tool may help you diagnose the issue.

In the example below, the tool is run from ArcMap.

Python environment

sys.prefix: C:\Python27\ArcGIS10.2

sys.executable: c:\program files\arcgis\desktop10.2\bin\RuntimeLocalServer.exe

Python run cmd: "C:\Python27\ArcGIS10.2x64\python.exe" "%1" %*

sys.path:

  c:\program files\arcgis\desktop10.2\bin

  c:\program files\arcgis\desktop10.2\Archie

  c:\program files\arcgis\desktop10.2\ArcPy

  c:\program files\arcgis\desktop10.2\ArcToolbox\Scripts

  C:\WINDOWS\system32\python27.zip

  C:\Python27\ArcGIS10.2\Lib

  C:\Python27\ArcGIS10.2\DLLs

  C:\Python27\ArcGIS10.2\Lib\lib-tk

  C:\Python27\ArcGIS10.2

  C:\Python27\ArcGIS10.2\lib\site-packages

UPDATE: Dan Patterson​ inspired me to modify the tool to always run in foreground (in Desktop), and add a second tool that will run in background (if enabled).

(This tool should run fine in Pro and Server, too, where everything "runs in background.")

Attachments
Comments

It just prints to the Results window, is that by design?  or is there a missing arcpy.AddMessage somewhere.  using 10.4 if that makes a difference

Like any other tool, it only displays to the Results window when run in background processing.

Ok, I never use background processing so that's why I didn't catch it

Version history
Last update:
‎05-21-2016 11:18 PM
Updated by:
Contributors