[Python] Is there a way to restart or reset the python interpreter within a python doctest?

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

  1. Stack

    Stack Membro Participativo

    I am writing a short tutorial, and would like to be able to run the examples therein using python's doctest using

    python -m doctest foo.txt


    There is a point in the tutorial at which I want to start using a new, clean python interpreter. Is there a mechanism for doing this?

    Continue reading...

Compartilhe esta Página