4

On Windows, how do I find the path to python.exe from within a script at runtime?

0

1 Answer 1

11
>>> import sys >>> sys.executable 'C:\\Program Files\\Python31\\pythonw.exe' 
Sign up to request clarification or add additional context in comments.

Comments