This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mcow
Recipients georg.brandl, mcow
Date 2009-08-10.17:09:51
SpamBayes Score 1.4730656e-06
Marked as misclassified No
Message-id <1249924192.93.0.340979032094.issue6677@psf.upfronthosting.co.za>
In-reply-to
Content
"Remove" and "unlink" are not the most widely-known verbs that come
to mind when thinking about deleting objects from the filesystem.
A recent Google search for "python delete file" led to the documentation
for the 'os' module:
  http://docs.python.org/library/os.html
but searching within that page for "delet" completely misses
os.remove(), os.unlink(), and os.rmdir().

Suggest simply expanding the first sentence of os.remove()'s paragraph to:
   Remove the file /path/ (delete the file).

Similarly for os.rmdir():
   Remove the directory /path/ (delete the directory).

Also regarding os.rmdir(), it would be nice to add a mention here of
this information from os.walk(): "rmdir() doesn’t allow deleting a
directory before the directory is empty."

The URL above is for the 2.6 version (chapter 16.1.4); also seen in the
3.1 documentation (15.1.5); presumably it's also in the development
versions.  Patching backwards as far as feasible would be appreciated.
History
Date User Action Args
2009-08-10 17:09:52mcowsetrecipients: + mcow, georg.brandl
2009-08-10 17:09:52mcowsetmessageid: <1249924192.93.0.340979032094.issue6677@psf.upfronthosting.co.za>
2009-08-10 17:09:51mcowlinkissue6677 messages
2009-08-10 17:09:51mcowcreate