Changeset 7752d1f in ammosreader for ammosreader/PPDWReader.py
- Timestamp:
- 05/20/23 20:56:15 (2 years ago)
- Branches:
- AmmosSource, guix
- Children:
- f3b78e8
- Parents:
- 4eb8a2f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ammosreader/PPDWReader.py
r4eb8a2f r7752d1f 1 from pathlib import Path2 3 1 from ammosreader.PDW import PDW 4 2 from ammosreader.PPDWContainer import PPDWContainer 3 from ammosreader import logger 4 5 5 6 6 class PPDWReader(): 7 """I read data from a file and return a PPDWContainer.""" 7 8 8 9 def __init__(self, a_file): … … 20 21 assert len(current_bytes) == 32 21 22 if not current_bytes: 22 # print('End of file detected')23 logger.info('End of file detected') 23 24 break 24 25 if self.cursor + 32 >= len(self.content): 25 # print('Can not read all 32 bytes of next PDW. EOF')26 logger.info('Can not read all 32 bytes of next PDW. EOF') 26 27 break 27 28 self.container.add(PDW.from_bytes(current_bytes))
Note:
See TracChangeset
for help on using the changeset viewer.