On Thu, May 14, 2015 at 8:11 PM, Grant Edwards <invalid@invalid.invalid> wrote: > On 2015-05-14, Dave Farrance <davefarra...@omitthisyahooandthis.co.uk> wrote: >> Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> wrote: >> >>>I'd like to do a little survey, and get a quick show of hands. >>> >>>How many people have written GUI or text-based applications or scripts where >>>a "Move file to trash" function would be useful? >>> >>>Would you like to see that in the standard library, even if it meant that >>>the library had feature-freeze and could gain no more functionality? >> >> It's bad enough when things are filesystem-dependent but this is >> OS-dependent or even desktop-version-dependent in the case of Linux >> distros, so not easy. > > Or even file-manager dependent. I think some desktops support > multiple file-manager (at least XFCE always used to) -- and there's > probably no requirement that they all handle "trash" the same way.
Actually, there is. There are actual STANDARDS in Linux desktops. One of them is the Trash Specification: http://standards.freedesktop.org/trash-spec/trashspec-1.0.html This spec is implemented by Xfce, KDE, GNOME, PCManFM and probably many others. And if you are looking for a mostly-compliant Python library/app (and a shameless plug): https://pypi.python.org/pypi/trashman/1.5.0 -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16 -- https://mail.python.org/mailman/listinfo/python-list