Survey -- Move To Trash function in Python?

Chris Warrick kwpolska at gmail.com
Thu May 14 14:43:11 EDT 2015


On Thu, May 14, 2015 at 8:11 PM, Grant Edwards <invalid at invalid.invalid> wrote:
> On 2015-05-14, Dave Farrance <DaveFarrance at OMiTTHiSyahooANDTHiS.co.uk> wrote:
>> Steven D'Aprano <steve+comp.lang.python at 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



More information about the Python-list mailing list