1
0
mirror of https://github.com/arsenetar/send2trash.git synced 2026-03-22 14:41:38 +00:00

Converted to py3k (haven't tried it on Windows yet, but it should compile and work...)

--HG--
branch : py3k
This commit is contained in:
Virgil Dupras
2010-07-07 16:12:13 +02:00
parent 88b90d859c
commit 2858b5b153
7 changed files with 52 additions and 26 deletions

View File

@@ -5,11 +5,11 @@
# http://www.hardcoded.net/licenses/bsd_license
import os.path as op
import _send2trash_win
import send2trash_win
def send2trash(path):
if not isinstance(path, unicode):
path = unicode(path, 'mbcs')
if not isinstance(path, str):
path = str(path, 'mbcs')
if not op.isabs(path):
path = op.abspath(path)
_send2trash_win.send(path)
send2trash_win.send(path)