Ejemplo n.º 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])
Ejemplo n.º 2
0
def WeatherProcess():
    weatherText.delete('1.0 ', END)
    select = weatherComboBox.get()
    returnList = []
    photo = PhotoImage(file="clean.gif")
    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])
        weatherText.insert(INSERT, "\n")
    if (returnList[2] == '날씨: 맑음'):
        photo = PhotoImage(file="clean.gif")
    elif (returnList[2] == '날씨: 구름 조금' or returnList[2] == '날씨: 구름 많음'
          or returnList[2] == '날씨: 흐림'):
        photo = PhotoImage(file="cloud.gif")
    elif (returnList[2] == '날씨: 비'):
        photo = PhotoImage(file="rain.gif")
    elif (returnList[2] == '날씨: 눈/비' or returnList[2] == '날씨: 눈'):
        photo = PhotoImage(file="snow.gif")