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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user