예제 #1
0
 def highest_temp(self, file_format):
     file_prefix = 'Temp_'
     tl = glob.glob(self.directory_path + '\\' + file_prefix + '*')
     zeroes = 5
     for i in range(10 ** zeroes):
         z = kustomWidgets.zeronater(i, zeroes)
         if i >= len(tl):
             break
         if (z in os.path.basename(tl[i])) is False:
             break
     new_file = self.directory_path + '\\' + file_prefix + z + '.' + file_format
     return new_file
예제 #2
0
 def get_run_time_dict(self):
     self.get_dir_list()
     self.parent.run_time_dict = {}
     self.parent.run_times = []
     for run in self.list_of_runs:
         if os.path.isdir(self.data_path + "\\" + run) is False:
             continue
         try:
             last_dash = run.rfind("_")
             if last_dash < 0 or last_dash < (len(run) - 8):
                 continue
             time_str = run[:last_dash]
             run_number = kustomWidgets.zeronater(int(run[run.rfind("_") + 4 :]), 3)
             # start_time = time.strptime(time_str, "%y%m%d_%H%M%S")
             start_time = datetime.datetime.strptime(time_str, "%y%m%d_%H%M%S")
             # self.parent.run_times.append(row.Run_endtime)
             self.parent.run_times.append(start_time)
             self.parent.run_time_dict[start_time] = "pre-R" + str(run_number)
             # self.parent.run_time_dict[row.Run_endtime] = 'mid-R' + str(row.Run_Number)
         except:
             pass
     self.parent.run_times = sorted(self.parent.run_times, reverse=True)