Poll: Do you use csv.Sniffer?

Discussion in 'Python' started by skip@pobox.com, Sep 25, 2009.

  1. Guest

    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 - - http://www.smontanaro.net/
    Getting old sucks, but it beats dying young
     
    , Sep 25, 2009
    #1
    1. Advertising

  2. Sean DiZazzo Guest

    On Sep 24, 7:26 pm, 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 - -http://www.smontanaro.net/
    >     Getting old sucks, but it beats dying young


    How do I mark the boxes??

    ~Sean
     
    Sean DiZazzo, Sep 25, 2009
    #2
    1. Advertising

  3. Mensanator Guest

    On Sep 24, 9:26�pm, 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
    > � � X 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?
    >
    > � � X 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?
    >
    > � � X 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 - -http://www.smontanaro.net/
    > � � Getting old sucks, but it beats dying young
     
    Mensanator, Sep 25, 2009
    #3
  4. John Machin Guest

    On Sep 25, 2:00 pm, Alex_Gaynor <> wrote:
    > On Sep 24, 10:26 pm, wrote:
    > > If you are a csv module user, I have a question for you:  Do you use the
    > > csv.Sniffer class?

    >
    > I just used it yesterday :)  Not having it would mean I'd need to add
    > another dependency to my project so that I can import data from my
    > client (it's easier to reexport his Excel spreadsheets as CSV and
    > import that), that's not the end of the world, but what's the argument
    > against leaving it in the stdlib?


    Why do you need the sniffer? If your client can't do "save as" the
    same way twice, just read the spreadsheets directly!
     
    John Machin, Sep 25, 2009
    #4
  5. Tim Chase Guest

    > Why do you need the sniffer? If your client can't do "save as" the
    > same way twice, just read the spreadsheets directly!


    If I only had one contact and one client, it would be this
    easy...If you can get multiple points of contact at multiple
    client sites to reliably & competently agree on a format, what
    are you doing here on c.l.py instead of making your billions as a
    business-integration consultant? ;-)

    -tkc
     
    Tim Chase, Sep 25, 2009
    #5
  6. John Machin Guest

    On 25/09/2009 7:04 PM, Tim Chase wrote:
    >> Why do you need the sniffer? If your client can't do "save as" the
    >> same way twice, just read the spreadsheets directly!

    >
    > If I only had one contact and one client, it would be this easy...If you
    > can get multiple points of contact at multiple client sites to reliably
    > & competently agree on a format, what are you doing here on c.l.py
    > instead of making your billions as a business-integration consultant? ;-)


    Because like everyone else, I can't get the same contact at the same
    site to do the same thing twice in a row :-(

    My point is that "save as CSV" is (a) a potentially lossy process and
    (b) an unnecessary step when you can read straight from the XLS file.
     
    John Machin, Sep 25, 2009
    #6
  7. nn Guest

    On Sep 24, 10:26 pm, 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 - -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.
     
    nn, Sep 25, 2009
    #7
  8. r Guest

    On Sep 24, 9:26 pm, wrote:
    > If csv.Sniff was to be removed from a future version of Python, how
    > difficult would it be to adapt?


    A good response would be...

    What are you adding to the stdlib that requires making space by
    removing csv.Sniff? Oh and, i never use the Sniffer ;-)
     
    r, Sep 25, 2009
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Laurent Laporte
    Replies:
    2
    Views:
    655
    Marc 'BlackJack' Rintsch
    Dec 29, 2005
  2. Replies:
    0
    Views:
    1,248
  3. Gabriel Genellina

    Re: csv.Sniffer - delete in Python 3.0?

    Gabriel Genellina, Mar 19, 2008, in forum: Python
    Replies:
    0
    Views:
    463
    Gabriel Genellina
    Mar 19, 2008
  4. birdsong

    select.poll.poll() never blocks

    birdsong, Feb 12, 2009, in forum: Python
    Replies:
    2
    Views:
    472
    birdsong
    Feb 12, 2009
  5. Jean-Paul Calderone

    Re: select.poll.poll() never blocks

    Jean-Paul Calderone, Feb 12, 2009, in forum: Python
    Replies:
    3
    Views:
    460
    birdsong
    Feb 12, 2009
Loading...

Share This Page