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 506e48b2e0 v1.1.0 10 years ago
send2trash Converted the compiled win module to ctypes. 10 years ago
.hgignore Updated package metadata. 10 years ago
.hgtags Added tag 1.0.1 for changeset a7e04d8e47e1 11 years ago
CHANGES v1.1.0 10 years ago
LICENSE Licensed under BSD. 11 years ago
README v1.1.0 10 years ago v1.1.0 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 moves the file to the first folder it finds that looks like a trash (so far, it's known to work on Ubuntu).

``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.