Appendix C. Setting up new Python projects

Procedure C.1.  Create a new project
  1. Set up the virtual environment. poetry init poetry add --group dev lsp ruff ruff-lsp

    Install the better debugger. pip install ipython

  2. Debugging

    For fancy debugging:

    1. Install ipdb

      poetry add --group dev ipdb

    2. Set this environment variable somewhere appropriate. In ~/.bashrc, probably

      export PYTHONBREAKPOINT="ipdb.set_trace"