Message91456
"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. |
|
Date |
User |
Action |
Args |
2009-08-10 17:09:52 | mcow | set | recipients:
+ mcow, georg.brandl |
2009-08-10 17:09:52 | mcow | set | messageid: <1249924192.93.0.340979032094.issue6677@psf.upfronthosting.co.za> |
2009-08-10 17:09:51 | mcow | link | issue6677 messages |
2009-08-10 17:09:51 | mcow | create | |
|