A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/303199.html below:

Sniffing Text Files

Sniffing Text FilesDavid Pratt fairwinds at eastlink.ca
Fri Sep 23 00:20:49 EDT 2005
Hi. I have files that I will be importing in at least four different 
plain text formats, one of them being tab delimited format, a couple 
being token based uses pipes (but not delimited with pipes), another 
being xml. There will likely be others as well but the data needs to be 
extracted and rewritten to a single format. The files can be fairly 
large (several MB) so I do not want to read the whole file into memory. 
What approach would be recommended for sniffing the files for the 
different text formats. I realize CSV module has a sniffer but it is 
something that is limited more or less to delimited files.  I have a 
couple of ideas on what I could do but I am interested in hearing from 
others on how they might handle something like this so I can determine 
the best approach to take. Many thanks.

Regards,
David

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4