Reading a file, sans whitespace

Uri phrogeeb at hotmail.com
Sat May 22 15:02:09 EDT 2004


I have a file that looks like this: (but longer, no wordwrap)

Name:     Date:     Time:   Company:   Employee Number:
Jim       2.03.04    12:00 JimEnt                    4
Steve     3.04.32    03:00 SteveEnt                  5

I want to load 'Jim' and '12:00' and those types of answers into
variables in my program, the only delimiter in the file is whitespace.
How do I do this?

I can do it with string.split(" ",[0]) type line for a file that's
only delimited by single spaces, but when I'm searching for white
space, how do I do it?

THanks!



More information about the Python-list mailing list