From f2779197b13fdbbd0d42e48215c51d24d86ee91b Mon Sep 17 00:00:00 2001 From: Diego Roversi Date: Thu, 12 Sep 2019 21:33:58 +0200 Subject: 2to3 of display module --- display/snd_windows.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'display/snd_windows.py') diff --git a/display/snd_windows.py b/display/snd_windows.py index 3aea3bd..73d575c 100644 --- a/display/snd_windows.py +++ b/display/snd_windows.py @@ -1,8 +1,8 @@ import sys -from cStringIO import StringIO -import puremixer +from io import StringIO +from . import puremixer import wingame -from music1 import Music +from .music1 import Music class Sound: @@ -19,9 +19,9 @@ class Sound: try: self.audio = wingame.Audio(1, self.freq, self.bits, self.bufsize) - except Exception, e: - print >> sys.stderr, "sound disabled: %s: %s" % ( - e.__class__.__name__, e) + except Exception as e: + print("sound disabled: %s: %s" % ( + e.__class__.__name__, e), file=sys.stderr) return self.mixer = puremixer.PureMixer(self.freq, self.bits, self.bits==16, byteorder='little') @@ -81,7 +81,7 @@ class Sound: def htmloptionstext(nameval): - import modes + from . import modes l = ['Sampling <%s>' % nameval('select', 'bits')] for bits in (8, 16): l.append('<'+nameval('option', 'bits', str(bits), default='16')+'>'+ -- cgit v1.2.3