Exemple #1
0
def queryinput_to_gen_yf(quote_id, start_y, start_m, start_d, stop_y, stop_m, stop_d, step = "d", headers = False):
    FancyURLOpener_obj = queryinput_to_csv_yf(quote_id, start_y, start_m, start_d, stop_y, stop_m, stop_d, step)
    headersline = FancyURLOpener_obj.readline() #basterebbe file.readline() per buttare via la 1a linea
    antichrono_linelist = FancyURLOpener_obj.readlines()
    if headers: antichrono_linelist.append(headersline)
    chrono_linegen = yield_from_last(antichrono_linelist)
    FancyURLOpener_obj.close()
    return chrono_linegen
 def file_to_datagen(self, file):
     headerlist = file.readline().rstrip(b"\n").split(b',')#basterebbe file.readline() per buttare via la 1a linea
     antichrono_linelist = file.readlines()
     chrono_linegen = yield_from_last(antichrono_linelist)
     file.close()
     return chrono_linegen