Re: FW: Reading a remove csv file

2017-11-06 Thread Thomas Jollans
On 2017-11-03 00:40, Stefan Ram wrote: > I knew I reïnvented something. Maybe it was »map«. Quite. If you really need that one-argument callable, you can curry map() with functools.partial. Also, that tréma is highly unorthodox. -- Thomas Jollans --

Re: FW: Reading a remove csv file

2017-11-02 Thread Terry Reedy
On 11/2/2017 9:18 AM, ROGER GRAYDON CHRISTMAN wrote: I have a partial answer to my own question: This seems to work for me: --- link = urllib.request.urlopen(urlpath) data = link.read().decode('utf-8').split('\n') reader = csv.DictReader(data) for row in reader: --- I think here my concern is

FW: Reading a remove csv file

2017-11-02 Thread ROGER GRAYDON CHRISTMAN
I have a partial answer to my own question: This seems to work for me: --- link = urllib.request.urlopen(urlpath) data = link.read().decode('utf-8').split('\n') reader = csv.DictReader(data) for row in reader: --- I think here my concern is that now 'data' is now a variable in my program's

Re: Reading a remove csv file

2017-11-02 Thread Peter Otten
ROGER GRAYDON CHRISTMAN wrote: > Just a quick question on how best to read a remote CSV file. > So far, I tried: > > filelink = urllib.request.urlopen(path) > dictread = csv.DictReader(filelink) > for row in dictread:... > But I'm running into the difference between strings and bytes. > I'd

Reading a remove csv file

2017-11-02 Thread ROGER GRAYDON CHRISTMAN
Just a quick question on how best to read a remote CSV file. So far, I tried: filelink = urllib.request.urlopen(path) dictread = csv.DictReader(filelink) for row in dictread:... But I'm running into the difference between strings and bytes. I'd like to squeeze a note that talks about the