[Python] Use exit instead of deactivate a virtual environment? : Using a subshell instead...

Discussão em 'Python' iniciado por Stack, Abril 29, 2025.

  1. Stack

    Stack Membro Participativo

    I am an occasional python programmer and keep forgetting to use deactivate. I usually type exit!

    There is a lot of old info about using subshells. For example:

    https://kiosk.tm/blog/data/developer-talk-merits-isolation-pythons-virtualnv/
    https://web.archive.org/web/20201111231240/https://datagrok.org/python/activate/
    https://github.com/sashahart/vex
    https://github.com/pew-org/pew


    I notice that even Astal's UV suggests source .venv/bin/activate

    The script from kiosk.tm is so simple and I find better.

    I'm wondering what the current thinking is?

    PS: Post completed after recovering from the Alicante black out!!

    Continue reading...

Compartilhe esta Página