parsing csv files class

Tim Roberts timr at probo.com
Tue Dec 30 23:51:06 EST 2008


"alex goretoy" <aleksandr.goretoy at gmail.com> wrote:
>
>This line doesn't work for me. bufferp is empty afterwards.
>
>self.bufferp= [dict(zip(header,line)) for line in reader]
>
>needs to be this
>self.bufferp= [dict(zip(header,line)) for line in self.buffer]

Yes, when I was writing this, I started out eliminating self.buffer
entirely.  When I added it back in, I forgot to change this back.

>I may need some assistance in another thread about a pycurl library. I want
>it to fall back to urllib/urllib2 if pycurl is not installed module. look
>for thread "pycurl urllib fallback" I will post it here shortly to
>python-list.

One common method is like this:

   try:
       import pycurl
   except ImportError:
       pycurl = None
       import urllib
-- 
Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.



More information about the Python-list mailing list