Survey -- Move To Trash function in Python?

Grant Edwards invalid at invalid.invalid
Thu May 14 14:11:24 EDT 2015


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. 

For this to work "right" you're going to need to be able to figure out
which desktop you're using: Linux systems often have multiple desktops
available.  Most of mine only have one, but some of them have as many
as three.

Then you might have to determine which file-manager you're using. 
Some of my desktops use file browsers that don't have any concept of
"trash".  And some of them don't have any file-browsers or "trash"
folders at all.

Sounds pretty nasty...

-- 
Grant Edwards               grant.b.edwards        Yow! MMM-MM!!  So THIS is
                                  at               BIO-NEBULATION!
                              gmail.com            



More information about the Python-list mailing list