Completely Deleting A Directory

Patrick Maupin pmaupin at
Mon Apr 26 20:58:34 CEST 2010

On Apr 26, 4:09 am, Lawrence D'Oliveiro <l... at geek-
central.gen.new_zealand> wrote:
> It doesn’t seem to mention in the documentation for os.walk
> <> that symlinks to directories are
> returned in the list of directories, not the list of files. This will lead
> to an error in the os.rmdir call in the example directory-deletion routine
> on that page.

They should probably remove that example, and just point the user to
shutil.rmtree() (as they do under the os.rmdir() description).


More information about the Python-list mailing list