python输出当前目录下的index.html文件路径的代码

python输出当前目录下的index.html文件路径的代码

如下的内容段是关于python输出当前目录下的index.html文件路径的内容,希望能对大伙有所用途。


import os
import sys

path = os.path.join(os.path.dirname(sys.argv[0]), 'index.html')
print path