How do I get the path of the current executed file in Python?

First, you need to import from inspect and os

from inspect import getsourcefile
from os.path import abspath

Next, wherever you want to find the source file from you just use

abspath(getsourcefile(lambda:0))

ref: http://*.com/questions/2632199/how-do-i-get-the-path-of-the-current-executed-file-in-python
上一篇:jquery 发送短信60后重新获取


下一篇:sqlserver智能提示插件-sql prompt(9.4.6)的安装及注册流程