__init__.py 715 B

123456789101112131415161718192021
  1. # Copyright 2013 Hardcoded Software (http://www.hardcoded.net)
  2. # This software is licensed under the "BSD" License as described in the "LICENSE" file,
  3. # which should be included with this package. The terms are also available at
  4. # http://www.hardcoded.net/licenses/bsd_license
  5. import sys
  6. from .exceptions import TrashPermissionError
  7. if sys.platform == 'darwin':
  8. from .plat_osx import send2trash
  9. elif sys.platform == 'win32':
  10. from .plat_win import send2trash
  11. else:
  12. try:
  13. # If we can use gio, let's use it
  14. from .plat_gio import send2trash
  15. except ImportError:
  16. # Oh well, let's fallback to our own Freedesktop trash implementation
  17. from .plat_other import send2trash