Poll: Do you use csv.Sniffer?

nn pruebauno at latinmail.com
Fri Sep 25 15:45:42 CEST 2009


On Sep 24, 10:26 pm, s... at pobox.com wrote:
> If you are a csv module user, I have a question for you:  Do you use the
> csv.Sniffer class?
>
>     o Yes, frequently
>     o Yes, on occasion
>     o I tried it a few times but don't use it now
>     o No, I don't need it
>     o No, never heard of it
>     o No (some other reason)
>
> If you don't use it, how do you figure out the structure of your csv files?
>
>     o I just know
>     o I stumble around in the dark trying different parameters until the csv
>       reader starts to spit out useful data
>
> If csv.Sniff was to be removed from a future version of Python, how
> difficult would it be to adapt?
>
>     o No problem
>     o No problem as long as you make it available via PyPI
>     o It would be a problem
>
> If it would be a problem for you (which would not easily be solved by adding
> it to PyPI), feel free to describe why it would be a challenge for you.  In
> fact, please feel free to add any other comments you like to your response.
>
> Private replies please.
>
> Thanks,
>
> --
> Skip Montanaro - s... at pobox.com -http://www.smontanaro.net/
>     Getting old sucks, but it beats dying young

Do you use the csv.Sniffer class? No. Don't use it right now.

how do you figure out the structure of your csv files? "head -2
filename" + visual inspection + guesswork

If csv.Sniff was to be removed from a future version of Python, how
difficult would it be to adapt? No problem.

It would still be nice if the code was available somewhere on the net.



More information about the Python-list mailing list