创建 files_utils.py
This commit is contained in:
14
modules/files_utils.py
Normal file
14
modules/files_utils.py
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import os
|
||||||
|
|
||||||
|
# 获取当前Python脚本的绝对路径
|
||||||
|
def get_path(script_name):
|
||||||
|
script_directory = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
parent_directory = os.path.dirname(script_directory)
|
||||||
|
# 使用os.path.join构建hook_conversions.js的完整路径
|
||||||
|
script_path = os.path.join(parent_directory,script_name)
|
||||||
|
print(script_path)
|
||||||
|
return script_path
|
||||||
|
|
||||||
|
def read_javascript(script_path):
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user