[Csv] How to install csv now?

Cliff Wells LogiplexSoftware at earthlink.net
Thu Mar 13 20:24:39 CET 2003


On Wed, 2003-03-12 at 18:10, Andrew McNamara wrote:
> >Now that Cliff has checked in util/sniffer.py how do we go about installing
> >it?  That is, how does csv/setup.py have to change?  I think it would work
> >if it was structured like
> >
> >    sandbox
> >        csv
> >            setup.py
> >            csv
> >                __init__.py
> >                util
> >                    __init__.py
> >                    sniffer.py
> >                csv.py
> >
> >and setup.py declared that "csv" was a package.
> 
> I agree.
> 
> I'd also be inclined to make __init__.py do 'from csv.csv import *', so
> that users can do "import csv" like normal, or 'import csv.util', etc.
> 
> >Unfortunately, I've always been leary of rearranging the CVS structure,
> >especially if the SF folks are involved.
> >
> >So, is there a way to modify setup.py but retain the current structure?
> 
> I've been trying to think of a way for a while, and nothing has occured -
> I think we just need to bite the bullet.

I'm glad to see that I'm not the only one who was worried about this
;-)  Part of the reason I hesitated checking my stuff in was due to
packaging/installation issues...

Anyway, I'd also like to hear some feedback on sniffer.py if anyone gets
some time to play with it.  I suspect a couple warts/bugs that I'm too
brain-dead at the moment to try and look for.  

Also, what other parameters besides delim, quotechar, skipinitialspace
do we think we should try to sniff?

And finally, there is at least one case

"all"
"work"
"and"
"no"
"play"

where there is no delimiter.  Right now sniffer returns '' (None already
meaning we couldn't sniff it).  How will this affect the csv parser
proper?  Is '' a valid argument for the delimiter?

-- 
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726 x308  (800) 735-0555 x308



More information about the Csv mailing list