def download_daily_bars(instrument, year, csvFile):
 bars = download_csv(instrument, datetime.date(year, 1, 1), datetime.date(year, 12, 31), 'd')
 f = open(csvFile, 'w')
 f.write(bars)
 f.close()

def download_daily_bars ( instrument , year , csvFile ) : bars = download_csv ( instrument , datetime . date ( year , 1 , 1 ) , datetime . date ( year , 12 , 31 ) , 'd' ) f = open ( csvFile , 'w' ) f . write ( bars ) f . close ( )
download daily bars from google finance for a given year .