[vlc-commits] Define unicode() in Python 3
cclauss
git at videolan.org
Fri Jul 13 12:00:53 CEST 2018
vlc/python | branch: master | cclauss <cclauss at bluewin.ch> | Tue Jul 10 16:51:03 2018 +0200| [eee496b3263c54189cb0f403cc9bac985389d3ac] | committer: GitHub
Define unicode() in Python 3
> http://git.videolan.org/gitweb.cgi/vlc/python.git/?a=commit;h=eee496b3263c54189cb0f403cc9bac985389d3ac
---
examples/qtvlc.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/examples/qtvlc.py b/examples/qtvlc.py
index 28d8925..d508848 100755
--- a/examples/qtvlc.py
+++ b/examples/qtvlc.py
@@ -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
"""
More information about the vlc-commits
mailing list