摘要: 包的编写 创建包 包的命名规则 包名必须以 + 开头,例如 +mypackage 。 包名不能包含空格或特殊字符。 包中的函数或类文件名必须与函数名或类名一致。 目录结构 /path/to/mypackage/ ├── +mypackage/ │ ├── myfunction.m │ └── myc 阅读全文
posted @ 2025-01-20 09:28 ReRound 阅读(73) 评论(0) 推荐(0)
摘要: 动态添加路径 import sys # 添加当前工作目录到 Python 的路径中 current_dir = os.getcwd() if current_dir not in sys.path: sys.path.append(current_dir) 阅读全文
posted @ 2025-01-20 09:27 ReRound 阅读(14) 评论(0) 推荐(0)