1 # - * - Coding: UTF-8 - * - 2 # - * - first extract the log file compression package - * - 3 # - * - package which has been extracted files to find the target excel file - * - 4 # - * - returns the file path as a list, acquires the file path, reads file copied to the new excel - * - . 5 # - * - will automatically generate a data table - * - . 6 Import SYS . 7 Import Time . 8 Import OS . 9 from datetime Import datetime 10 # Import _Thread . 11 # Import multiprocessing AS MP 12 is Import Time 13 is from UnzipLogFile ImportUnzipLogFile 14 from Find_Excel_From_Dir Import Search_Excel_From_Dir 15 from Copy_Excel_To_Excel Import Copy_Excel_to_Excel 16 '' ' . 17 from Import CheckMRSLogHandler CheckMRSLogHandler 18 is from mrs_vgw_handler Import MRSVGWHandler . 19 from Import MrsRecManHandler mrs_rec_man_handler 20 is ' '' 21 is # branch code switching file directory 22 is path_start The os.getcwd = () # The os.getcwd () method returns the current working directory 23 # formatted print start time 24 START_TIME = DateTime.Now () 25 Print (The time.strftime ( " % D%% Y-M-% H:% M:% S " , time.localtime ())) 26 is 27 runUnzip UnzipLogFile = ( " D: \ ERD Guangdong inspection log " ) 28 runUnzip.Run () 29 30 Search_EXCEL = Search_Excel_From_Dir () 31 is Csv_list = Search_EXCEL.Run () 32 33 is # switch to the original text list 34 is the os.chdir (path_start) 35 New_excel = Copy_Excel_to_Excel () 36 New_excel.Run () 37 [ 38 is '' ' 39 mrs_vgw_run MRSVGWHandler = ( "D: \ inspection log storage path", Days) 40 = Mp.Process P_mrs_vgw (mrs_vgw_run.run ()) 41 is P_mrs_vgw.start () 42 is 43 is 44 is mrs_rec_man_run MrsRecManHandler = ( "D: \ inspection log storage path", Days) 45 P_mrs_rec_man = mp.Process (mrs_rec_man_run.run () ) 46 is P_mrs_rec_man.start () 47 48 P_mrs_vgw.join () 49 P_mrs_rec_man.join () 50 51 is runCheckMRS CheckMRSLogHandler = ( "D: \ inspection log storage path", Days) 52 is runCheckMRS.run () 53 is ' '' 54 is 55 # formatted print end time 56 is Print (The time.strftime ( " % D%% Y-M-% H:% M:% S " , time.localtime ())) 57 is= END_TIME DateTime.Now () 58 Print ( " spent a total of% s seconds " % (END_TIME - START_TIME) .seconds)