Jay Mutter III wrote:
Kent;
Thanks for the reply on tutor-python.
My data file which is just a .txt file created under WinXP by an OCR
program contains lines like:
A.-C. Manufacturing Company. (See Sebastian, A. A.,
and Capes, assignors.)
A. G. A. Railway Light Signal Co. (See
Jay Mutter III wrote:
Luke;
I'm a bit pressed for time right now and I can't look over this e-mail.
Please reply on-list in the future using the 'reply-all' feature.
You're more likely to get a prompt response.
(this e-mail is carbon copied to the list, so don't worry about sending
another.)
Jay Mutter III wrote:
Jay Mutter III jmutter at uakron.edu
http://mail.python.org/mailman/listinfo/tutor wrote
/ See example// //next:/
/ A.-C. Manufacturing Company. (See Sebastian, A. A.,/
/ and Capes, assignors.)/
/.../
/Aaron, Solomon E., Boston, Mass. Pliers. No. 1,329,155 ;/
/Jan. 27 ;
Jay Mutter III jmutter at uakron.edu wrote
See example next:
A.-C. Manufacturing Company. (See Sebastian, A. A.,
and Capes, assignors.)
...
Aaron, Solomon E., Boston, Mass. Pliers. No. 1,329,155 ;
Jan. 27 ; v. 270 ; p. 554.
For instance, I would like to go to end of line and if last
# The next 5 lines are so I have an idea of how many lines i started
with in the file.
in_filename = raw_input('What is the COMPLETE name of the file you
want to open:')
in_file = open(in_filename, 'r')
text = in_file.read()
read() returns a one-dimensional list with all the data,
Hy Jay,
I just allways wonder how fine this book about text processing with
python.
Text Processing in Python at http://gnosis.cx/TPiP/
It shows that Python can be as effective as Perl. The question is the how.
Take a look on it.
Yours sincerely,
__
János Juhász
I am using an intel iMac with OS -X 10.4.8.
It has Python 2.3.5.
My issue is that I have a lot of text ( about 500 pages at the
moment) that I need to parse so that I can eliminate info I don't
need, break the remainder into fields and put in a database/spreadsheet.
See example next:
A.-C.
Jay Mutter III [EMAIL PROTECTED] wrote
See example next:
A.-C. Manufacturing Company. (See Sebastian, A. A.,
and Capes, assignors.)
...
Aaron, Solomon E., Boston, Mass. Pliers. No. 1,329,155 ;
Jan. 27 ; v. 270 ; p. 554.
For instance, I would like to go to end of line and if last
character