Created
October 4, 2016 03:34
-
-
Save bluethon/1b795f972eb5a6becf5d9274073e6e0f to your computer and use it in GitHub Desktop.
python中获取解释器路径
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://docs.python.org/library/sys.html | |
import sys | |
print(sys.executable) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
有没有其他方法?如果脚本内嵌在其他程序中,sys.executable会显示外部程序路径而不是解释器路径