summaryrefslogtreecommitdiff
path: root/display/snd_windows.py
diff options
context:
space:
mode:
authorDiego Roversi <diegor@tiscali.it>2019-09-12 21:33:58 +0200
committerDiego Roversi <diegor@tiscali.it>2019-09-12 21:33:58 +0200
commitf2779197b13fdbbd0d42e48215c51d24d86ee91b (patch)
tree968267aa9909470c27b43109029e87d1f126b4e7 /display/snd_windows.py
parentbc2155a93cd15c975881d7ca8f57f0f4b5c4aa27 (diff)
2to3 of display module
Diffstat (limited to 'display/snd_windows.py')
-rw-r--r--display/snd_windows.py14
1 files changed, 7 insertions, 7 deletions
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 = ['<font size=-1>Sampling <%s>' % nameval('select', 'bits')]
for bits in (8, 16):
l.append('<'+nameval('option', 'bits', str(bits), default='16')+'>'+