Beispiel #1
0
def rm_data():
# remove data from our diary
    date = Input.get_Date()
    if date in weather:
        del weather[date]
		#save changes in file
        Open_file.save_data(weather)            
        tmp = input('Removing Successful. Press Enter to continue...')
    else:
        tmp = input('Day in diary not found. Press Enter to continue...')
Beispiel #2
0
def add_data():
#add data to our weather diary#
    date = Input.get_Date()
    temp = Input.get_temp()
    preasure = Input.get_preasure()
    humidity = Input.get_humidity()
    wspeed = Input.get_wspeed()
    wdirect = input('Enter wind direction (eg. SW or S): ')
    prec = input('Enter precipitations (eg. Rain or Snow): ')
    tmp = {date:[temp, preasure, humidity, wspeed, wdirect, prec]}
	#rewrite data that already exsist
    weather.update(tmp) 
	#save changes in file
    Open_file.save_data(weather)                               
    tmp = input('Adding/Editing Successful. Press Enter to continue...')