Appendix C. Setting up new Python projects
Procedure C.1.
Create a new project
-
Set up the virtual environment.
poetry init poetry add --group dev lsp ruff ruff-lsp
Install the better debugger.
pip install ipython
-
Debugging
For fancy debugging:
-
Install ipdb
poetry add --group dev ipdb
-
Set this environment variable somewhere appropriate. In
~/.bashrc
, probablyexport PYTHONBREAKPOINT="ipdb.set_trace"
-