Completely Deleting A Directory
Patrick Maupin
pmaupin at gmail.com
Mon Apr 26 14:58:34 EDT 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
> <http://docs.python.org/library/os.html> 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).
Regards,
Pat
More information about the Python-list
mailing list