MCPcopy
hub / github.com/DeppWang/youdaonote-pull / get_script_directory

Function get_script_directory

core/common.py:5–13  ·  view source on GitHub ↗

获取脚本所在的目录

()

Source from the content-addressed store, hash-verified

3
4
5def get_script_directory():
6 """获取脚本所在的目录"""
7
8 if getattr(sys, "frozen", False):
9 # 如果是打包后的可执行文件
10 return os.path.dirname(sys.executable)
11 else:
12 # 如果是普通脚本
13 return "."

Callers 4

_covert_configMethod · 0.90
_check_local_dirMethod · 0.90
init_loggingFunction · 0.90
__init__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected