Project Name: GEMPACKsoftware+HARPY
Language: Python
Statement Type: API

Source Code:
def readHarFileInfo(filename: str) -> HarFileInfoObj:
        """
        :param filename: Filename.
        :return: An `dict`, with the key-value pairs:

        """
        hfiObj = HarFileInfoObj(file=filename)

        with open(filename, "rb") as f:
            f.seek(0)
            while True:
                # Read all header names
                pos, name, end_pos = HarFileIO._readHeaderPosName(f)
                if not name:
                    break
                hfiObj.addHAInfo(name, pos, end_pos)
                hfi=hfiObj.ha_infos[name]
                (hfi.version, hfi.data_type, hfi.storage_type,  hfi.long_name, hfi.file_dims) = HarFileIO._getHeaderInfo(f, name)
        return hfiObj

readHarFileInfo(filename='test_remove_header_array.har')

Selected Statement: with open(filename, "rb") as f:

Function Input:
filename: 'test_remove_header_array.har'

Variable Values Before Statement:
filename: 'test_remove_header_array.har'

Value After Statement Execution: <_io.BufferedReader name

Variable States During Runtime (line, value):
filename: 1
'test_remove_header_array.har'
hfiObj: 7
{filename='/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/GEMPACKsoftware+HARPY/GEMPACKsoftware+HARPY/test_remove_header_array.har', _mtime=1708906163.399167, _ha_infos=OrderedDict()}
16
{filename='/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/GEMPACKsoftware+HARPY/GEMPACKsoftware+HARPY/test_remove_header_array.har', _mtime=1708906163.399167, _ha_infos=OrderedDict([('XXCD', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334730>)])}
16
{filename='/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/GEMPACKsoftware+HARPY/GEMPACKsoftware+HARPY/test_remove_header_array.har', _mtime=1708906163.399167, _ha_infos=OrderedDict([('XXCD', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334730>), ('XXCR', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163345e0>)])}
16
{filename='/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/GEMPACKsoftware+HARPY/GEMPACKsoftware+HARPY/test_remove_header_array.har', _mtime=1708906163.399167, _ha_infos=OrderedDict([('XXCD', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334730>), ('XXCR', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163345e0>), ('XXCP', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163347c0>)])}
16
{filename='/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/GEMPACKsoftware+HARPY/GEMPACKsoftware+HARPY/test_remove_header_array.har', _mtime=1708906163.399167, _ha_infos=OrderedDict([('XXCD', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334730>), ('XXCR', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163345e0>), ('XXCP', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163347c0>), ('XXHS', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334910>)])}
16
{filename='/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/GEMPACKsoftware+HARPY/GEMPACKsoftware+HARPY/test_remove_header_array.har', _mtime=1708906163.399167, _ha_infos=OrderedDict([('XXCD', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334730>), ('XXCR', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163345e0>), ('XXCP', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163347c0>), ('XXHS', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334910>), ('CHST', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163340a0>)])}
16
{filename='/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/GEMPACKsoftware+HARPY/GEMPACKsoftware+HARPY/test_remove_header_array.har', _mtime=1708906163.399167, _ha_infos=OrderedDict([('XXCD', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334730>), ('XXCR', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163345e0>), ('XXCP', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163347c0>), ('XXHS', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334910>), ('CHST', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163340a0>), ('INTA', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334280>)])}
16
{filename='/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/GEMPACKsoftware+HARPY/GEMPACKsoftware+HARPY/test_remove_header_array.har', _mtime=1708906163.399167, _ha_infos=OrderedDict([('XXCD', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334730>), ('XXCR', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163345e0>), ('XXCP', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163347c0>), ('XXHS', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334910>), ('CHST', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163340a0>), ('INTA', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334280>), ('SIMP', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163341c0>)])}
16
{filename='/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/GEMPACKsoftware+HARPY/GEMPACKsoftware+HARPY/test_remove_header_array.har', _mtime=1708906163.399167, _ha_infos=OrderedDict([('XXCD', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334730>), ('XXCR', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163345e0>), ('XXCP', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163347c0>), ('XXHS', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334910>), ('CHST', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163340a0>), ('INTA', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334280>), ('SIMP', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163341c0>), ('SIM2', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163503a0>)])}
16
{filename='/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/GEMPACKsoftware+HARPY/GEMPACKsoftware+HARPY/test_remove_header_array.har', _mtime=1708906163.399167, _ha_infos=OrderedDict([('XXCD', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334730>), ('XXCR', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163345e0>), ('XXCP', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163347c0>), ('XXHS', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334910>), ('CHST', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163340a0>), ('INTA', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334280>), ('SIMP', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163341c0>), ('SIM2', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163503a0>), ('NH01', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016350430>)])}
16
{filename='/local/rcs/jinjun/code/pytrace-collector/logs/pypibugs/tried/GEMPACKsoftware+HARPY/GEMPACKsoftware+HARPY/test_remove_header_array.har', _mtime=1708906163.399167, _ha_infos=OrderedDict([('XXCD', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334730>), ('XXCR', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163345e0>), ('XXCP', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163347c0>), ('XXHS', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334910>), ('CHST', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163340a0>), ('INTA', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016334280>), ('SIMP', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163341c0>), ('SIM2', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163503a0>), ('NH01', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd016350430>), ('ARR7', <harpy.har_file_io.HarFileInfoObj._HAInfo object at 0x7fd0163342b0>)])}
f: 9
<_io.BufferedReader name='test_remove_header_array.har'>
pos: 13
0
13
206
13
482
13
624
13
3940
13
4136
13
4352
13
4490
13
4630
13
5088
13
6127
name: 13
'XXCD'
13
'XXCR'
13
'XXCP'
13
'XXHS'
13
'CHST'
13
'INTA'
13
'SIMP'
13
'SIM2'
13
'NH01'
13
'ARR7'
13
None
end_pos: 13
12
13
218
13
494
13
636
13
3952
13
4148
13
4364
13
4502
13
4642
13
5100
13
6127
hfi: 17
{name='XXCD', pos_name=0, pos_data=12, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=0, data_type=None, storage_type=None, long_name=None, file_dims=None, sets=None, coeff_name=None}
18
{name='XXCD', pos_name=0, pos_data=12, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=1, data_type='1C', storage_type='FULL', long_name='Creation Date and Time                                                ', file_dims=(1, 70), sets=None, coeff_name=None}
17
{name='XXCR', pos_name=206, pos_data=218, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=0, data_type=None, storage_type=None, long_name=None, file_dims=None, sets=None, coeff_name=None}
18
{name='XXCR', pos_name=206, pos_data=218, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=1, data_type='1C', storage_type='FULL', long_name='Creating Program                                                      ', file_dims=(2, 70), sets=None, coeff_name=None}
17
{name='XXCP', pos_name=482, pos_data=494, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=0, data_type=None, storage_type=None, long_name=None, file_dims=None, sets=None, coeff_name=None}
18
{name='XXCP', pos_name=482, pos_data=494, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=1, data_type='1C', storage_type='FULL', long_name='compiler used to make EXE which created this file                     ', file_dims=(1, 6), sets=None, coeff_name=None}
17
{name='XXHS', pos_name=624, pos_data=636, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=0, data_type=None, storage_type=None, long_name=None, file_dims=None, sets=None, coeff_name=None}
18
{name='XXHS', pos_name=624, pos_data=636, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=1, data_type='1C', storage_type='FULL', long_name='File History                                                          ', file_dims=(53, 60), sets=None, coeff_name=None}
17
{name='CHST', pos_name=3940, pos_data=3952, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=0, data_type=None, storage_type=None, long_name=None, file_dims=None, sets=None, coeff_name=None}
18
{name='CHST', pos_name=3940, pos_data=3952, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=1, data_type='1C', storage_type='FULL', long_name='Simple set of strings                                                 ', file_dims=(5, 12), sets=None, coeff_name=None}
17
{name='INTA', pos_name=4136, pos_data=4148, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=0, data_type=None, storage_type=None, long_name=None, file_dims=None, sets=None, coeff_name=None}
18
{name='INTA', pos_name=4136, pos_data=4148, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=1, data_type='2I', storage_type='FULL', long_name='2D integer array                                                      ', file_dims=(4, 4), sets=None, coeff_name=None}
17
{name='SIMP', pos_name=4352, pos_data=4364, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=0, data_type=None, storage_type=None, long_name=None, file_dims=None, sets=None, coeff_name=None}
18
{name='SIMP', pos_name=4352, pos_data=4364, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=1, data_type='1C', storage_type='FULL', long_name='Set SimpleSet Simple 2 item set                                       ', file_dims=(2, 1), sets=None, coeff_name=None}
17
{name='SIM2', pos_name=4490, pos_data=4502, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=0, data_type=None, storage_type=None, long_name=None, file_dims=None, sets=None, coeff_name=None}
18
{name='SIM2', pos_name=4490, pos_data=4502, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=1, data_type='1C', storage_type='FULL', long_name='Set SimpleSet2 Simple set 2                                           ', file_dims=(2, 2), sets=None, coeff_name=None}
17
{name='NH01', pos_name=4630, pos_data=4642, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=0, data_type=None, storage_type=None, long_name=None, file_dims=None, sets=None, coeff_name=None}
18
{name='NH01', pos_name=4630, pos_data=4642, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=1, data_type='RE', storage_type='FULL', long_name='Simple 2 dimensional array                                            ', file_dims=(2, 2, 1, 1, 1, 1, 1), sets=None, coeff_name=None}
17
{name='ARR7', pos_name=5088, pos_data=5100, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=0, data_type=None, storage_type=None, long_name=None, file_dims=None, sets=None, coeff_name=None}
18
{name='ARR7', pos_name=5088, pos_data=5100, parent_har_file=<harpy.har_file_io.HarFileInfoObj object at 0x7fd016334ee0>, version=1, data_type='RE', storage_type='FULL', long_name='7-Dimensional Array                                                   ', file_dims=(2, 2, 2, 2, 2, 2, 2), sets=None, coeff_name=None}