Runnable with both Python3 and Python2, with both PyQt5 and PyQt4 by using Qt.py #2250

Open
kashikoibumi wants to merge 127 commits from kashikoibumi/py3qt into v0.6
Showing only changes of commit 047ee359b3 - Show all commits

View File

@ -5,6 +5,8 @@ def ustr(v):
if six.PY3:
if isinstance(v, str):
return v
elif isinstance(v, bytes):
return v.decode("utf-8", "replace")
else:
return str(v)
# assume six.PY2