Deleting a file?

Jerry Hill malaclypse2 at gmail.com
Mon May 16 23:06:44 EDT 2011


On Mon, May 16, 2011 at 5:23 PM, garyr <garyr at fidalgo.net> wrote:
> A file can be deleted by opening it with mode os.O_TEMPORARY and then
> closing it. How can a file be moved to the Recycle Bin, a la Windows?

I see a send2trash module (http://hg.hardcoded.net/send2trash and
http://www.hardcoded.net/articles/send-files-to-trash-on-all-platforms.htm)

The source code looks pretty straightforward, but I don't think
there's anything in the standard library that does that.

-- 
Jerry



More information about the Python-list mailing list