You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Virgil Dupras 0f95d7506e v1.2.0 10 years ago
send2trash Check access and devices before attempting trash. 10 years ago
.hgignore Updated package metadata. 10 years ago
.hgtags Added tag 1.1.0 for changeset de5f43fcce5e 10 years ago
CHANGES v1.2.0 10 years ago
LICENSE Licensed under BSD. 11 years ago Adjusted packaging metadata for 1.1.0. 10 years ago
README v1.2.0 10 years ago v1.2.0 10 years ago Modification to symlink test case (that will actually fail when it should -- find_mount_point using abspath instead of realpath.) 10 years ago


Send2Trash -- Send files to trash on all platforms

This is a Python 3 package. The Python 2 package is at .

Send2Trash is a small package that sends files to the Trash (or Recycle Bin) *natively* and on
*all platforms*. On OS X, it uses native ``FSMoveObjectToTrashSync`` Cocoa calls, on Windows, it uses native (and ugly) ``SHFileOperation`` win32 calls. On other platforms, it follows the trash specifications from

``ctypes`` is used to access native libraries, so no compilation is necessary.


Download the source from and install it with::

>>> python install


>>> from send2trash import send2trash
>>> send2trash('some_file')

When there's a problem ``OSError`` is raised.