source: ammosreader/sample_scripts/iqdw_reader.py@ bf33fd7

AmmosSource guix
Last change on this file since bf33fd7 was d62906b, checked in by Enrico Schwass <ennoausberlin@…>, 3 years ago

more info methods inside container added

  • Property mode set to 100644
File size: 531 bytes
RevLine 
[1e781ba]1import sys
2
[f3421e6]3from ammosreader.AmmosIFReader import AmmosIFReader
[1e781ba]4
5if __name__ == '__main__':
6
7 if len(sys.argv) != 2:
8 sys.exit()
9
10 file_name = sys.argv[1]
11
12 print("File name:", file_name)
13
14 dat_file = AmmosIFReader(file_name)
15
16 dat_file.read_all_frames_left()
[6d0f203]17 print("Frequencies", dat_file.container.frequencies())
18 print("Frame types:", dat_file.container.frame_types())
[d62906b]19 print("Total frame sizes:", sum(dat_file.container.frame_sizes()))
[6d0f203]20 print("Homogenic:", dat_file.container.is_homogenic())
Note: See TracBrowser for help on using the repository browser.