January 2011
1 post
2 tags
python readline and tab-delimited excel text data
Answer: use reader = open(source,’rU’) instead of the normal reader = open(source,’r’) to enable universal newline support. http://docs.python.org/library/functions.html#open
Yesterday I had all kinds of trouble reading tab-delimited text I had used excel to clean up and reformat. I scoured the internet, and had no luck for a long time either googling this problem or...