예제 #1
0
    def db_selection():
        """This is to create selection for update or download fullset"""
        print('Please select from (1)download a full set of'
              ' weather data or (2)update it')
        x = int(input())

        if x != 1 and x != 2:
            raise Exception()

        if(x == 1):
            full_set = DBOperations()
            full_set.create_database()
        if(x == 2):
            test = WeatherProcessor()
            print('Most recent date in database is', test.newest_date)
            print("Updating Database to today's date")
            test.update_db()
            print("Updating Database successed")
예제 #2
0
 def full_data(self, event):
     """This event will download the fullset of data"""
     full_set = DBOperations()
     full_set.create_database()