New to python.... I have a large file that I need to break up
into multiple smaller files. I need to break the large file
into sections where there are 65535 lines and then write those
sections to seperate files.  I am familiar with opening and
writing files, however, I am struggling with creating the
sections and writing the different sections to their own
files.

While this thread has offered many nice Python solutions, the "split" command is pretty standard on most Linux boxes:

  bash$ split -l 65535 infile.txt

which will do what you describe. You can read the man page for more details.

So if you just want a fast route to a goal rather than going through the learning process (I'm all for learning how to do it too), this may be a quick answer.

-tkc



--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to