Scripts to setup and manage a Python virtual environment
At the root directory of the Python module (where requirements.txt is located) run the following command in PowerShell.
New-Code Python
This will copy the directories under the DevEnv module directory .pcode_python/
over to your current directory and run the build script.
If multiple versions of Python are found, the script will provide a selection to choose from. A version may also be passed in as an argument.
New-Code Python 2.7
Run the command Enter-Code
in your workspace directory.
If a PowerShell session is started in the workspace root directory or has the $env:PWD path pointed to the workspace then aliases specific to the workspace are added.
Python workspace alias build added
Python workspace alias clean added
(venv) PS C:\git\project>
Removes all pip packages and installs the packages listed in requirements.txt
Another file may be specified as an argument to use as a requirements file.
clean dev_requirements.txt
Launches idle from the virtual environment
Runs pylint across all Python (*.py) files in the current directory.