Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Book Program
- #By Ray Weiss 2017
- from sys import argv
- from os.path import exists
- script, from_file, to_file = argv
- infile = open(from_file)
- indata = in_file.read()
- def insert_newlines(infile, every=255):
- lines = []
- for i in xrange(0, len(infile), every):
- if isspace(infile[254]) == False:
- lines.append(infile.rfind(lines, beg=254 end=0))
- return '\n'.join(lines)
- else:
- lines.append(infile[i:i+every])
- return '\n'.join(lines)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement