Hi everyone,

I'm a complete ignoramus when it comes to Mac, so I can't say anything about that, but as I understand the discussion, there are problems with implementing this on Mac. Okay. So maybe this should be available only on Windows and Linux? (If it's not a problem to do on Linux.) As much as I don't like having functionality that's only available on certain OSs, it makes more sense than depriving Windows users of functionality that they could be using just because Mac doesn't support it. (And of course, Python has lots of OS-specific modules.)

So maybe we can add a function to the `os` module that sends a file to the recycle bin, and a constant that will say whether the current OS supports this? Then we could have code like this: 

if os.RECYCLE_BIN_SUPPORT:
    os.recycle(my_file)
else:
    os.remove(my_file)

What do you think? 


Thanks,
Ram.

On Thu, Jan 1, 2015 at 1:14 AM, Steven D'Aprano <steve@pearwood.info> wrote:
On Wed, Dec 31, 2014 at 11:50:04AM +0100, Andrew Barnert wrote:
> On Dec 31, 2014, at 0:47, Steven D'Aprano <steve@pearwood.info> wrote:

> > What's wrong with asking the Finder to move the file? Under what
> > circumstances would that be unacceptable? Are there scenarios on OS X
> > where the Finder isn't available but the trash is?
>
> I already answered this briefly earlier in the thread, but in more detail:
[...]

Thank you for the detailed and extensive answer!


--
Steven
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/