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.
sys.executable: c:\program files\arcgis\desktop10.2\bin\RuntimeLocalServer.exe
Python run cmd: "C:\Python27\ArcGIS10.2x64\python.exe" "%1" %*
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.")