Add wrapper functions to RAOBReader
This commit is contained in:
parent
5dc8c90d17
commit
3a8f5ae850
1 changed files with 11 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue