On Windows XP SP2 and Python 2.3.3 or 2.4 a call to os.remove returns Errno 13 permission denied on a read-only file. On linux, python will delete a read-only file.
Logged In: YES user_id=967320 Yup. I can reproduce that on Win2k. Seems posixmodule.c uses _unlink, _wunlink, which are documented at MS as failing on readonly: "Each of these functions returns 0 if successful. Otherwise, the function returns –1 and sets errno to EACCES, which means the path specifies a read-only file, or to ENOENT, which means the file or path is not found or the path specified a directory." Seems others have "fixed" it by just changing the mode and trying again: http://sources.redhat.com/ml/cygwin/2001-05/msg01209.htmlhttps://www.cvshome.org/cyclic/cvs/unoff-watcom.txt
Logged In: YES user_id=38376 This is a platform issue; Windows associates delete privileges with the file, Unix with the directory. I doubt it's a good idea to "fix" Python's remove by making it incompatible with the C library's implementation. (on the C level, unlink() is the same thing as remove(), btw).