On Thursday, December 12, 2013 5:20:59 PM UTC-5, Chris Angelico wrote:
> import urllib
>
> import csv
>
>
>
> # You actually could get away with not using a with
>
> # block here, but may as well keep it for best practice
>
> with open('clients.csv') as f:
>
> for client in csv.reader(f
In <88346903-2af8-48cd-9829-37cedb717...@googlegroups.com> Matt Graves
writes:
> import urllib
> import csv
> urls = []
> clientname = []
> ###This will set column 7 to be a list of urls
> with open('clients.csv', 'r') as f:
> reader = csv.reader(f)
> for column in reader:
> url
On Fri, Dec 13, 2013 at 8:43 AM, Matt Graves wrote:
> ###This SHOULD plug in the URL for F, and the client name for G.
> def downloadFile(urls, clientname):
> urllib.urlretrieve(f, "%g.csv") % clientname
>
> downloadFile(f,g)
>
> When I run it, I get : AttributeError: 'file' object has no attr
On 12/12/2013 21:43, Matt Graves wrote:
I have a CSV file containing a bunch of URLs I have to download a file from for
clients (Column 7) and the clients names (Column 0) I tried making a script to
go down the .csv file and just download each file from column 7, and save the
file as [clientna
I have a CSV file containing a bunch of URLs I have to download a file from for
clients (Column 7) and the clients names (Column 0) I tried making a script to
go down the .csv file and just download each file from column 7, and save the
file as [clientname].csv
I am relatively new to python, so