Example #1
0
def WeatherProcess():
    global weatherResult
    weatherText.delete('1.0 ', END)
    select = weatherComboBox.get()
    returnList = []
    if select == "서울":
        returnList = Weather.ConnectServer("seoul")
    elif select == "인천":
        returnList = Weather.ConnectServer("Incheon")
    elif select == "강원도":
        returnList = Weather.ConnectServer("Gangwon")
    elif select == "충청도":
        returnList = Weather.ConnectServer("Daesun")
    elif select == "경상도":
        returnList = Weather.ConnectServer("busan")
    elif select == "전라도":
        returnList = Weather.ConnectServer("Junrado")
    for i in range(0, 5, 1):
        weatherText.insert(INSERT, returnList[i])
        weatherResult.append(returnList[i])
        weatherText.insert(INSERT, "\n")
    foreCastData = Weather.ForeCast()
    weatherText.insert(INSERT, "\n")
    weatherText.insert(INSERT, "\n")
    weatherText.insert(INSERT, "내일 : " + foreCastData[0])
    weatherResult.append("내일 : " + foreCastData[0])
    weatherText.insert(INSERT, "\n")
    weatherText.insert(INSERT, "내일 모래 : " + foreCastData[1])
    weatherResult.append("내일 모래 : " + foreCastData[1])