Last change
on this file since 349 was
149,
checked in by ajj, 16 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
|
Line | |
---|
1 | #!/usr/bin/env python |
---|
2 | |
---|
3 | #Read and write ICP Buffer files |
---|
4 | |
---|
5 | import sys |
---|
6 | import struct |
---|
7 | |
---|
8 | formatstr = '<50sh21f4s4i4f148x' |
---|
9 | |
---|
10 | |
---|
11 | def 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 | |
---|
27 | if __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.