Skip to content

Commit

Permalink
import unicode_literals from __future__ to ease compatibility between…
Browse files Browse the repository at this point in the history
… python 2 and 3
  • Loading branch information
thomasleveil committed Mar 9, 2014
1 parent 47f8cac commit 325edff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mpsyt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python

# encoding: utf-8
"""
mps-youtube.
Expand All @@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
"""

from __future__ import print_function
from __future__ import print_function, unicode_literals
from math import ceil

__version__ = "0.01.38"
Expand Down Expand Up @@ -946,8 +946,8 @@ def mplayer_help(short=True):

volume = "[{0}9{1}] volume [{0}0{1}]"
volume = volume if short else volume + " [{0}ctrl-c{1}] return"
seek = u"[{0}\u2190{1}] seek [{0}\u2192{1}]"
pause = u"[{0}\u2193{1}] SEEK [{0}\u2191{1}] [{0}space{1}] pause"
seek = "[{0}\u2190{1}] seek [{0}\u2192{1}]"
pause = "[{0}\u2193{1}] SEEK [{0}\u2191{1}] [{0}space{1}] pause"

if non_utf8:
seek = "[{0}<-{1}] seek [{0}->{1}]"
Expand Down Expand Up @@ -1310,7 +1310,7 @@ def mplayer_status(popen_object, prefix=""):
last_displayed_line = None

while popen_object.poll() is None:
char = popen_object.stdout.read(1)
char = popen_object.stdout.read(1).decode('utf-8')

if char in '\r\n':
m = re_mplayer_audio_status.match(buff)
Expand Down

0 comments on commit 325edff

Please sign in to comment.