how to work with tab-delimited files?

John Salerno johnjsal at NOSPAMgmail.com
Tue May 23 13:56:31 EDT 2006


When you're using tabs to separate values in a text file, what do you do 
in the case where pressing the tab key doesn't really advance the cursor 
a full tab space (but instead just one or two spaces) because that's 
where the next tab stop is?

Example:

Joe Smith
John    Salerno

So the second entry has a full tab space between the names, but the 
first doesn't, despite the fact that the tab key was pressed. So in this 
situation, when the file is being read, is that single space still 
determined to be a tab, or do you have to press tab twice to put a full 
tab between the names?

Thanks.



More information about the Python-list mailing list