[Python-ideas] Adding `pathlib.Path` method that would send file to recycle bin

Nick Coghlan ncoghlan at gmail.com
Tue Jan 6 05:43:33 CET 2015


On 5 January 2015 at 20:38, David Wilson <dw+python-ideas at hmmz.org> wrote:
> I have no problem with this being included somehow in the standard
> library, but pathlib to me is all about the filesystem, whereas (as
> others have pointed out), the Recycle Bin and associated concepts on
> other OS relate pretty uniformly to the OS shell.
>
> There are many shell-related concepts that could be nicely exposed, but
> again I don't think any of them belong in pathlib. For example,
> labels/tags, owner application, icon, visibility flags, etc.

Better tools for accessing typical extended file metadata would indeed
be highly desirable (thumbnails/previews are another one that comes to
mind). As with the recycle bin though, the generally preferred
approach for standard library additions is incorporating existing
modules that have been available through PyPI for some time, or else
creating a derivative of such a project that meets other constraints
of standard library inclusion (e.g. ipaddress vs the project it was
based on, ipaddr).

Unfortunately, most of the folks that need these cross-platform
integration features are likely to be using a C/C++ toolkit that
provides them (e.g. Gtk, Qt, wxWidgets), which significantly reduces
the incentive for anyone to create a Python-specific abstraction that
would be suitable for eventual inclusion in the standard library.

Regards,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list