English
pyCombineris a lightweight CLI tool that merges multiple Python modules into a single.pyfile. It's ideal for simplifying distribution and debugging, without the need for converting to.exe.
中文
pyCombiner是一个轻量级命令行工具,用于将多个 Python 模块合并为单一文件,便于发布和调试,无需转换成.exe。
日本語
pyCombinerは複数の Python ファイルを 1 つの.pyファイルにまとめるコマンドラインツールです。
| Use Case | Tool | Output Type |
|---|---|---|
| Merge self-written modules | pyCombiner | Single .py file |
| Merge installed packages | stickytape |
Single .py file |
| Executable zip | zipapp |
.pyz file |
Create .exe |
PyInstaller |
.exe binary |
pyCombiner is a command-line utility that recursively merges Python files into a single script.
- Similar to PyInstaller but simpler
- Result is
.pyinstead of.exe
Demo Project:
examples/demo_complicate
pip install pycombinerYou can try pyCombiner using the built-in demo project:
Step 1: Clone the demo project
git clone https://github.com/KissesJun/pyCombiner.git
cd pyCombiner/tests/examples/deep_demoStep 2: Run pyCombiner on the example
pycombiner main.pyStep 3: Check the output
PS C:\xxxxx\pyCombiner\tests\examples\deep_demo> pycombiner main.py
開始ファイルパス: main.py
プロジェクトディレクトリ: C:\xxxxx\pyCombiner\tests\examples\deep_demo
保存ディレクトリ: C:\xxxxx\pyCombiner\tests\examples\deep_demo
File Importing Tree:
└── main.py
├── module1.py
│ └── module3.py
│ └── module4.py
├── module2.py
│ └── module3.py
│ └── module4.py
├── module4.py
├── module3.py
│ └── module4.py
├── module4.py
└── module4.py
The output file is: C:\xxxxx\pyCombiner\tests\examples\deep_demo\main20250602_172431_combined.py🤩 Done!
Output:
dir # or 'ls' on Unix-based systems ディレクトリ: C:\xxxxx\pyCombiner\tests\examples\deep_demo
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 2025/06/02 17:23 subdir
-a---- 2025/06/02 17:23 270 main.py
-a---- 2025/06/02 17:24 308 main20250602_172431_combined.py
-a---- 2025/06/02 17:23 62 module1.py
-a---- 2025/06/02 17:23 0 __init__.py
- Created by KissesJun
- Open source under MIT License

