Define unicode() in Python 3
authorcclauss <cclauss@bluewin.ch>
Tue, 10 Jul 2018 14:51:03 +0000 (16:51 +0200)
committerGitHub <noreply@github.com>
Tue, 10 Jul 2018 14:51:03 +0000 (16:51 +0200)
examples/qtvlc.py

index 28d8925..d508848 100755 (executable)
@@ -24,6 +24,12 @@ import os.path
 import vlc
 from PyQt4 import QtGui, QtCore
 
+try:
+    unicode        # Python 2
+except NameError:
+    unicode = str  # Python 3
+
+
 class Player(QtGui.QMainWindow):
     """A simple Media Player using VLC and Qt
     """