Add wrapper functions to RAOBReader

This commit is contained in:
XANTRONIX 2025-03-02 17:06:56 -05:00
parent 5dc8c90d17
commit 3a8f5ae850

View file

@ -379,3 +379,14 @@ class RAOBReader():
def each_sounding(self):
for chunk in self.each_chunk():
yield from chunk.each_sounding()
@staticmethod
def each_sounding_from_fh(fh: io.TextIOBase):
reader = RAOBReader(fh)
yield from reader.each_sounding()
@staticmethod
def each_sounding_from_file(path: str):
with open(path, 'r') as fh:
yield from RAOBReader.each_sounding_from_fh(fh)