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 ivan.radic
Recipients ivan.radic, r.david.murray, tim.golden, zach.ware
Date 2013-11-18.16:54:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384793664.72.0.840937482533.issue19643@psf.upfronthosting.co.za>
In-reply-to
Content
>You are essentially asking that we have an option to make the windows behavior mirror the posix behavior?  (A read only file in a writable directory can be deleted in posix, since only the directory entry, not the file, is being deleted.)

Actually, your explanation is perfect.
I want to be able to remove some directory after I am done using it. When similar operation is done through file manager, dialog pops up asking for confirmation, I would like to have function parameter equivalent of "yes to all" dialog that file manager gives me.

The thing is, anyone working with files is used to think in "rm -rf" kind of way, and on Windows read_only files break this workflow. I discovered this problem few days ago when I was working on custom backup script that needs to work both on Linux (at home) and Windows (at work). Currently, I need to have some extra *windows only* code just to be able to successfully remove a directory.

Quick Google search discovered the workaround (http://stackoverflow.com/questions/1889597/deleting-directory-in-python), so I am set, but the original 
question: "Why oh why is this such a pain?"
and the comment: "Maybe nobody has taken the five minutes to file a bug at bugs.python.org" 
resonated in my head long enough to give it a try.

For me it makes sense to have this option configurable. And it make a ton of sense to support one line equivalent of "rm -rf".
History
Date User Action Args
2013-11-18 16:54:24ivan.radicsetrecipients: + ivan.radic, tim.golden, r.david.murray, zach.ware
2013-11-18 16:54:24ivan.radicsetmessageid: <1384793664.72.0.840937482533.issue19643@psf.upfronthosting.co.za>
2013-11-18 16:54:24ivan.radiclinkissue19643 messages
2013-11-18 16:54:24ivan.radiccreate