22 lines
372 B
Python
22 lines
372 B
Python
import sys
|
|
#filename = 'c16.bin'
|
|
filename=sys.argv[1]
|
|
|
|
with open(filename, 'rb') as f:
|
|
content = f.read()
|
|
l=open (filename+'_lo.bin','wb');
|
|
h=open (filename+'_hi.bin','wb');
|
|
i=0
|
|
EOF=len(content)
|
|
while i<16384:
|
|
l.write(content[i]);
|
|
i=i+1;
|
|
l.close;
|
|
while i<EOF:
|
|
h.write(content[i]);
|
|
i=i+1;
|
|
h.close;
|
|
f.close;
|
|
|
|
h.close;
|
|
print filename+' splitted' |