source: sans/utils/bt5/ICPGui/ICPBufferUtils.py @ 149

Last change on this file since 149 was 149, checked in by ajj, 15 years ago

pygtk interface for ICP

Aim is to combine icp, prepare and xpeek.

Uses python and gtk

  • Property svn:executable set to *
File size: 493 bytes
RevLine 
[149]1#!/usr/bin/env python
2
3#Read and write ICP Buffer files
4
5import sys
6import struct
7
8formatstr = '<50sh21f4s4i4f148x'
9
10
11def readIBufferFile(inputfile):
12       
13        f = open(inputfile, 'rb')
14        data = f.read()
15        f.close()
16       
17        #print struct.calcsize(formatstr)
18        lines = {}
19       
20        for i in range(30):
21                lines[i] = struct.unpack(formatstr,data[i*320:(i+1)*320])
22
23                #print line
24               
25        return lines
26
27if __name__ == "__main__":
28        if len(sys.argv) > 1:
29                readIBufferFile(sys.argv[1])
30        else:
31                readIBufferFile("IBUFFER.BUF")
Note: See TracBrowser for help on using the repository browser.