[Python-ideas] Adding `pathlib.Path` method that would send file to recycle bin
Andrew Barnert
abarnert at yahoo.com
Sun Jan 4 22:02:27 CET 2015
On Jan 4, 2015, at 20:24, random832 at fastmail.us wrote:
> On Fri, Jan 2, 2015, at 20:50, Steven D'Aprano wrote:
>
>> Getting OS X right is very complicated, as Andrew has so ably explained.
>>
>> In Linux and other Unixes, the situation is like OS X, only more so
>> since there's no one single authority.
>
> However, what authority there is does not allegedly demand that you
> present dialog boxes and admin elevation prompts to the user (this has
> been asserted, but no citation has been given).
Where has that, or anything remotely similar, been alleged or asserted?
What _has_ been asserted is that an app has to fit in with the choices made by the platform implementation.
And the only example given was given with a direct quote from the spec linked in the preceding email. I'm not sure how much simpler a citation you need in order to be able to follow it.
The example was about platform-specific ways to allow admins to disable sticky-bit checking on network mounts. There are more such things that are left incompletely specified, or explicitly left unspecified for future development. I don't think any of them have anything to do with dialog boxes or other user interaction, and I don't recall anyone saying otherwise. (I suppose if you didn't read carefully, you might take something like "SHOULD warn the administrator" as implying a prompt saying "Go get your sys admin and drag him over to the screen" rather than, say, a syslog warning with a string the admin can see later and look up in help or google).
>> You have a choice of desktop
>> environments, which may or may not provide a move-to-trash API,
>> including no desktop environment at all. Gnome provides an API for
>> moving to trash, but I don't know how well it supports the freedesktop
>> standard; KDE supports the freedesktop standard, but I don't know if it
>> provides an API that can be called. XFCE has partial support.
>
> I don't see why you need to call an API to the desktop enviroment. The
> entire point of the spec is to provide compatibility _between_
> implementations on the same filesystem - you can quit gnome and log into
> KDE and see the same trash. Python would just be a separate
> implementation that stands by itself.
The last sentence is exactly the same thing you already got two detailed answers to that you haven't responded to in any way. So I suspect the reason you don't understand why calling an API is a good idea is that you skimmed over the explanations that would explain exactly that. Go back and read those emails.
More information about the Python-ideas
mailing list