Can python read up to where a certain pattern is matched?

William Park opengeometry at yahoo.ca
Sat Mar 6 22:00:14 EST 2004


Anthony Liu <antonyliu2002 at yahoo.com> wrote:
> I am kinda new to Python, but not new to programming. 
> I am a certified Java programmer.
> 
> I don't want to read line after line, neither do I
> want to read the whole file all at once.  Thus none of
> read(), readline(), readlines() is what I want. I want
> to read a text file sentence by sentence. 

Question: How do I read sentence by sentence?
Answer: Read input stream char by char.

-- 
William Park, Open Geometry Consulting, <opengeometry at yahoo.ca>
Linux solution for data processing and document management.



More information about the Python-list mailing list