python - 如何将 Python 项目压缩到单个文件中
问题描述
我有以下文件结构
/src
/test
extra.py
main.py
额外的.py
def hello:
print("hello")
主文件
from test import extra
extra.hello()
是否可以生成单个文件
def hello:
print("hello")
hello()
解决方案
推荐阅读
- powershell - 使用 PowerShell 写入输出创建后损坏的 Cmd 脚本
- html - 显示弹性元素的中间
- spring-kafka - MessageListenerContainer 的度量方法未捕获正确的值
- reactjs - prevState 和 ...state 之间的区别
- python - 如何在 django rest 框架中返回当前用户的预订历史记录?
- oracle-sqldeveloper - SQLDeveloper 创建“截断”模式转储
- python - 是否可以在 python 3 中将原始字节添加到 TarFile 对象?
- python - 显示每个输出在“X”中显示的次数
- sql - 如何在 SQL 中选择每个类别的前 n 条记录而没有任何重复?
- phpstorm - ESLint 'module' 未定义。(no-undef) 进入 PhpStorm