Re: Read-only error

Random832 <[email protected]> Mon, 13 Jul 2026 15:03:55 -0400
Newsgroups gmane.comp.python.general
Message-ID <[email protected]>
On Mon, Jul 13, 2026, at 12:36, Chris Angelico via Python-list wrote:
>> In the same way, surely it is useful to have more information
>> about why trying to delete a file failed.
>
> Only if the OS provides it.

this is why I suggested it might be worthwhile to add an exception type for "file could not be opened/deleted because another program has it open", because, unlike the permission vs readonly scenario, Windows does provide a separate error code for that situation (which is typically not an error on Unix systems). It's not a particularly urgent problem, though, since the winerror property is available.