origapp = sys.executable if "ArcMap" in origapp: arcpy.AddMessage("...The python script is being executed from ArcGIS/Toolbox") elif "Pythonwin.exe" in origapp: print "...The python script is being executed from PythonWin"
sys.executable.
value = sys.stdout print value
value = sys.stdout arcpy.AddMessage(str(value))
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.