Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
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
5
def
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_config
Method · 0.90
_check_local_dir
Method · 0.90
init_logging
Function · 0.90
__init__
Method · 0.90
Calls
no outgoing calls
Tested by
no test coverage detected