Skip to content

Commit

Permalink
turn a 2K memory dump data file into two 1024 byte tracks for the dis…
Browse files Browse the repository at this point in the history
…k drive. rename them as necessary
  • Loading branch information
ladyada committed Oct 18, 2010
1 parent 1b56a4f commit 93a863b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions splitfile2track.py
@@ -0,0 +1,24 @@
import sys


if len(sys.argv) != 2:
print 'Usage: %s file.dat' % sys.argv[0]
print 'Splits a 2K file.dat file into two 1K track files track0.dat and track1.dat'
sys.exit()



infile = open(sys.argv[1], 'r')

track0file = open("track0.dat", 'w')
track1file = open("track1.dat", 'w')

t0dat = infile.read(1024)
t1dat = infile.read(1024)


track0file.write(t0dat)
track0file.close()

track1file.write(t1dat)
track1file.close()

0 comments on commit 93a863b

Please sign in to comment.