''' Purpose: print the contents of a CSV web file ''' # specify data source CSV_WEB_FILE = 'http://www.cs.virginia.edu/~cs1112/datasets/csv/rows_of_stuff.csv' # import local module url to help automate getting contents of a web resource import url # get web resource dataset as rows of strings dataset = url.get_dataset_as_rows_of_strings( CSV_WEB_FILE ) # echo dataset row by row for row in dataset : print( row ) print() # get web resource dataset as rows of values dataset = url.get_dataset( CSV_WEB_FILE ) # echo dataset row by row for row in dataset : print( row )