diff options
author | Nuno André Novo <nandre@ecomt.net> | 2019-03-10 03:26:09 +0300 |
---|---|---|
committer | Ruined1 <ruined1@gmail.com> | 2019-04-26 17:36:18 +0300 |
commit | 9f1d2aa58cec76306c3dc6887e7c9c92769936fe (patch) | |
tree | 74030b84ef34363d35d394e71ee6ca9fddfa0dd1 /dwt.py | |
parent | 690da22586fe8eda2dc8e045e6e83a329a4be17c (diff) |
Adds Python 3 compatibility
Diffstat (limited to 'dwt.py')
-rw-r--r-- | dwt.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -21,6 +21,7 @@ import platform import traceback import webbrowser from ctypes import windll +from six import u import wx from wx.lib.itemspicker import ItemsPicker, IP_SORT_SELECTED, IP_SORT_CHOICES, IP_REMOVE_FROM_CHOICES @@ -470,10 +471,10 @@ def exception_hook(error, value, trace): def check_elevated(silent=False): if not bool(windll.advpack.IsNTAdmin(0, None)): if silent: - windll.shell32.ShellExecuteW(None, u"runas", unicode(sys.executable), u"{0} -silent".format(unicode(__file__)), None, 1) + windll.shell32.ShellExecuteW(None, u"runas", u(sys.executable), u"{0} -silent".format(u(__file__)), None, 1) sys.exit(1) else: - windll.shell32.ShellExecuteW(None, u"runas", unicode(sys.executable), unicode(__file__), None, 1) + windll.shell32.ShellExecuteW(None, u"runas", u(sys.executable), u(__file__), None, 1) sys.exit(1) def silent(): |