[Tutor] how to parse a multiple character words from plaintext

John Gunderman meanburrito920 at yahoo.com
Sat Feb 23 06:46:58 CET 2008


I am looking to parse a plaintext from a document. However, I am confused about the actual methodology of it. This is because some of the words will be multiple digits or characters. However, I don't know the length of the words before the parse. Is there a way to somehow have open() grab something until it sees a /t or ' '? I was thinking I could have it count ahead the number of spaces till the stopping point and then parse till that point using read(), but that seems sort of inefficient. Is there a better way to pull this off? Thanks in advance.

John




      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20080222/5c1d2b99/attachment.htm 


More information about the Tutor mailing list