Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python3
- import sys
- if len(sys.argv) != 4: sys.ext(1)
- record_size = 30000
- data_size = int(sys.argv[2])
- if record_size < data_size: sys.exit(1)
- with open(sys.argv[1], 'rb') as f:
- with open(sys.argv[3], 'wb') as w:
- data = f.read(record_size)
- while data:
- w.write(data[:data_size])
- data = f.read(record_size)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement