Generate .bat files for python scripts/modules
- Free software: MIT license
- Documentation: https://pybatgen.readthedocs.io.
PyBatGen is a CLI tool designed to automate the creation of .bat scripts for Python programs. With PyBatGen, you can easily generate batch scripts that execute your Python scripts/modules, making it simpler to run them on Windows systems. It also allows you to manage dependencies and virtual environments seamlessly.
- Generates .bat files for Python script(s) and places them on PATH.
- Optionally specify virtual environment (venv), additional directories to include, and destination folder.
- Ensures the created scripts are compatible with the current Python environment.
You can install PyBatGen using pip:
pip install pybatgen
Basic usage of PyBatGen is straightforward. Here's how you can generate a .bat script for your Python entry file:
pybatgen path/to/entry_script.py
You can also specify additional directories to include, a custom destination folder, and a virtual environment:
pybatgen path/to/entry_script.py --include-dir path/to/dir1 --include-dir path/to/dir2 --dest path/to/destination --venv path/to/venv
Generate a .bat script for a simple Python script:
pybatgen my_script.py
Generate a .bat script with additional directories included:
pybatgen my_script.py --include-dir lib --include-dir utils
Specify a custom destination for the generated .bat script:
pybatgen my_script.py --dest C:/custom/path
Use a virtual environment:
pybatgen my_script.py --venv C:/path/to/venv
This project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions! Please see our contributing guidelines for details on how to get started.
- Documentation: https://pybatgen.readthedocs.io.
- Add more customization options for .bat script generation.
- Enhance error handling and user feedback.
- Implement support for more complex project structures.
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.