This script helps you to create a new Python project with a specific Python version and a virtual environment on windows.
- Copy the
project_config.py.sample
file toproject_config.py
and edit the values in the file to your liking. The values in the file will be used as default values when creating a new project. You can also edit the values later when creating a new project. - Run the script with
python main.py
. - You will be asked to enter the name of your new project. Type the name and press Enter.
- Confirm the name of your project by typing
y
and pressing Enter. - The script will then display a list of Python versions found in your PATH. Each version will be displayed with an index, the version number, and the path.
- Enter the index of the Python version you want to use for your project and press Enter.
- If the directory for the project already exists, the script will notify you and stop. If not, it will proceed to create the directory structure for your project.
- The script will ask you if you want to create a
.gitignore
file. If you want to create one, typey
and press Enter. The script will download a standard Python.gitignore
file from GitHub. - The script will then use the selected Python version to create a virtual environment in your project directory.
- Finally, the script will ask you if you want to open the created project in VS Code. If you want to open it, type
y
and press Enter.
- Windows
- Python 3.6 or higher
- Access to the internet (for downloading the
.gitignore
file) - VS Code (if you want to open the project in VS Code)
If you encounter any errors while running the script, the error message will be printed to the console. If you can't resolve the issue, please open an issue on GitHub.