[Python] How do I allow a user to select a file?

Discussão em 'Python' iniciado por Stack, Fevereiro 5, 2025.

  1. Stack

    Stack Membro Participativo

    Right now, I have this line in my code to hard-code the directory path

    dir_path = '/home/user/pywork'


    but I would rather let the user select it herself using a construct similar to R's scan(choose.files()).

    How do I go about it?

    Thanks,

    Continue reading...

Compartilhe esta Página