예제 #1
0
def display():
    results_dis = "SELECT * FROM results;"
    results = hello.execute_read_query(connection, results_dis)
    for res in results:
        ins = "%s - City: %s - Country: %s - Weather: %s - Description: %s - Temperature: %s f - Wind Speed: %s mph" % (
            res[0], res[1], res[2], res[3], res[4], res[5], res[6])
        print(ins)
    print("------------------------------------")
예제 #2
0
def windspeed():
    results_wind = "SELECT * FROM results ORDER BY wind;"
    wind_result = hello.execute_read_query(connection, results_wind)
    for winds in wind_result:
        inst = "%s - City: %s - Country: %s - Weather: %s - Description: %s - Temperature: %s f - Wind Speed: %s mph" % (
            winds[0], winds[1], winds[2], winds[3], winds[4], winds[5],
            winds[6])
        print(inst)
    print("------------------------------------")
예제 #3
0
def tempframe():
    results_temp = "SELECT * FROM results ORDER BY temp;"
    temp_result = hello.execute_read_query(connection, results_temp)
    for temps in temp_result:
        inst = "%s - City: %s - Country: %s - Weather: %s - Description: %s - Temperature: %s f - Wind Speed: %s mph" % (
            temps[0], temps[1], temps[2], temps[3], temps[4], temps[5],
            temps[6])
        print(inst)
    print("------------------------------------")