Page 507 - 3-2
P. 507

if re.search(u' 날씨', transcript, re.I):



                                fontObj = pygame.font.Font('H2HDRM.TTF',150)

                                screen = pygame.display.set_mode((1080, 1920), DOUBLEBUF)



                                L = obs.get_location()
                                City_name = L.get_name()

                                print(u'City_ID 의 도시명은 ' + City_name + u'     입니다.')



                                # get_weather 는 기상정보에 대한 정보를 가져옵니다.
                                W = obs.get_weather()

                                Temp = W.get_temperature(unit='celsius')
                                print(City_name + u' 의 현재기온은 ' + str(Temp['temp']) + u'       도 입니다.')

                                Status = W.get_status()
                                if Status == 'Clear':

                                    Status_ko = ' 맑은 날씨 입니다'
                                    images = pygame.image.load('SUNNY.png')

                                elif Status == 'Rain':
                                    Status_ko = ' 비가 내리는 중 입니다'

                                    images = pygame.image.load('RAIN.png')
                                elif Status == 'Clouds':

                                    Status_ko = ' 흐린 날씨 입니다.'
                                    images = pygame.image.load('CLOUDY.png')

                                elif Status == 'Haze':
                                    Status_ko = ' 안개가 자욱합니다'

                                    images= pygame.image.load('HAZE.png')
                                elif Status =='Mist':

                                    Status_ko =' 옅은 안개가 끼었습니다'
                                    images = pygame.image.load('MIST.png')

                                elif Status =='Drizzle':
                                    Status_ko =' 보슬비가 내리는 중 입니다.'

                                    images= pygame.image.load('DRIZZLE.png')



                                print(City_name + u' 의 현재날씨는 ' + Status + u'       입니다.')
                                today=fontObj.render( '%s' % str(Temp['temp']),True, WHITE, BLACK)



                                                         - 507 -
   502   503   504   505   506   507   508   509   510   511   512