开发者

Getting python.exe path at run time [duplicate]

This question already has answers here: Find full path of the Python interpreter? 开发者_运维技巧 (3 answers) Closed 2 months ago.

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


>>> import sys
>>> sys.executable
'C:\\Program Files\\Python31\\pythonw.exe'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜