1 Star 0 Fork 0

何俊峰/SFTP的Server和Client

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
ProjectConfig.py 787 Bytes
一键复制 编辑 原始数据 按行查看 历史
frederic he 提交于 2024-06-12 14:02 . 上传代码文件
import json
import os
import platform
def load_config(config_path):
"""
loading config
"""
try:
with open(config_path, "r", encoding="utf-8") as f:
return json.load(f)
except Exception as e:
print("Config file not found, {}".format(e))
raise
folder_name = 'ClematisLogSCC'
# Get the operating system type
system_type = platform.system()
# Set the desktop path according to the operating system type
if system_type == "Windows":
desktop_path = os.path.dirname(os.getcwd())
else:
desktop_path = os.path.join(os.path.expanduser("~"), "Desktop") # Default case
project_folder_path = os.path.join(desktop_path, folder_name)
config_path = os.path.join(project_folder_path, 'config.json')
CONFIG = load_config(config_path)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/frederic-he/ServerClientOfSftp.git
git@gitee.com:frederic-he/ServerClientOfSftp.git
frederic-he
ServerClientOfSftp
SFTP的Server和Client
master

搜索帮助