[Python] Why do i get a `'PosixPath' object has no attribute 'walk'` exception?

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

  1. Stack

    Stack Membro Participativo

    Why do i get a 'PosixPath' object has no attribute 'walk' exception?

    from pathlib import Path
    p = Path()
    for dirpath, dirnames, filenames in p.walk():
    print(dirpath, dirnames, filenames)

    Continue reading...

Compartilhe esta Página