summaryrefslogtreecommitdiffstats
path: root/Lib/wave.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/wave.py')
-rw-r--r--Lib/wave.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/wave.py b/Lib/wave.py
index 76b73de..5177ecb 100644
--- a/Lib/wave.py
+++ b/Lib/wave.py
@@ -92,6 +92,7 @@ _array_fmts = None, 'b', 'h', None, 'i'
_wave_params = namedtuple('_wave_params',
'nchannels sampwidth framerate nframes comptype compname')
+
def _byteswap(data, width):
swapped_data = bytearray(len(data))
@@ -104,7 +105,6 @@ def _byteswap(data, width):
class _Chunk:
def __init__(self, file, align=True, bigendian=True, inclheader=False):
- import struct
self.closed = False
self.align = align # whether to align to word (2-byte) boundaries
if bigendian:
@@ -214,7 +214,6 @@ class _Chunk:
raise EOFError
-
class Wave_read:
"""Variables used in this class:
@@ -411,6 +410,7 @@ class Wave_read:
self._comptype = 'NONE'
self._compname = 'not compressed'
+
class Wave_write:
"""Variables used in this class:
@@ -638,6 +638,7 @@ class Wave_write:
self._file.seek(curpos, 0)
self._datalength = self._datawritten
+
def open(f, mode=None):
if mode is None:
if hasattr(f, 'mode'):