コード例 #1
0
ファイル: W_diary.py プロジェクト: VetalCoder/Laba2_Zamyatin
def add_data():
    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]}
    weather.update(tmp)                                         # rewrite data that already exsist
    Open_file.save_data(weather, Configs.get_type())                                # save changes in file
    input('Press Enter to continue...')
コード例 #2
0
ファイル: W_diary.py プロジェクト: VetalCoder/Lab1_Zamyatin
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...')