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
MANIFEST.in Adjusted packaging metadata for 1.1.0. 10 years ago
README v1.2.0 10 years ago
setup.py v1.2.0 10 years ago
test_plat_other.py Modification to symlink test case (that will actually fail when it should -- find_mount_point using abspath instead of realpath.) 10 years ago

README

==================================================
Send2Trash -- Send files to trash on all platforms
==================================================

This is a Python 3 package. The Python 2 package is at http://pypi.python.org/pypi/Send2Trash .

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 freedesktop.org.

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

Installation
------------

Download the source from http://hg.hardcoded.net/send2trash and install it with::

>>> python setup.py install

Usage
-----

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

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