Re: Iterators from urllib2

2005-07-22 Thread Andrew Dalke
Joshua Ginsberg wrote: > >>> dir(ifs) > ['__doc__', '__init__', '__iter__', '__module__', '__repr__', 'close', > 'fileno', 'fp', 'geturl', 'headers', 'info', 'next', 'read', > 'readline', 'readlines', 'url'] > > Yep. But what about in my code? I modify my code to print dir(ifs) > before cr

Re: Iterators from urllib2

2005-07-22 Thread Michael Hoffman
Joshua Ginsberg wrote: > I'm a bit baffled by something... > > In a script I wrote, I have defined a function that runs > urllib2.urlopen() on a urllib2.Request object and returns the file-like > object. The code that calls this function attempts to build a > csv.DictReader object based on t

Iterators from urllib2

2005-07-22 Thread Joshua Ginsberg
I'm a bit baffled by something... In a script I wrote, I have defined a function that runs urllib2.urlopen() on a urllib2.Request object and returns the file-like object. The code that calls this function attempts to build a csv.DictReader object based on that file-like object, but an error