It should display path to executable and version of Python for scripts run with direct invocation of Python (python myscript.py) as well as for scripts run dire
python myscript.py
This might be what you're looking for:
python -c "import sys; print sys.executable"