[Python] One liner for printing python's path

Discussão em 'Python' iniciado por Stack, Agosto 25, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to put in my script a one-liner that would print my python's path

    python -c 'import sys; for p in sys.path: print(p)'


    the for keyword is flagged as an invalid syntax

    I was expecting that the semicolon would work as a new line character, yet it disappointed me.

    Continue reading...

Compartilhe esta Página