Update wave_reader.py

Working on a walk() method, not done yet
This commit is contained in:
Jamie Hardt
2019-01-03 19:22:13 -08:00
parent 8e965f53e5
commit 0ec5425cd8

View File

@@ -125,7 +125,17 @@ class WavInfoReader():
ixml_string = ixml_data
return WavIXMLFormat(ixml_string)
def walk(self):
"""
Walk all of the available metadata fields.
:yields: a string, the :scope: of the metadatum, the string :name: of the
metadata field, and the value
"""
scopes = ('fmt','data')#,'bext','ixml','info')
for scope in scopes:
attr = self.__getattribute__(scope)
for field in attr._fields:
yield scope, field, attr.__getattribute__(field)