You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
530 B
Python

#!/usr/bin/python
from optparse import OptionParser
import pytables
import record
import sys
def printHDF(hdf_file):
r = pytables.FlowRecordsTable(hdf_file)
recordReader = record.RecordReader(r)
for rec in recordReader:
print rec
if __name__ == "__main__":
usage = 'usage: %prog file_name.h5'
p = OptionParser(usage)
options, arguments = p.parse_args()
if len(arguments) != 1:
sys.stderr.write('Exactly one argument expected\n')
exit(1)
printHDF(arguments[0])