The test for a locked output file occurs at the end of processing, which can unfortunately be after an hour or two of processing. When designing the system, I hadn't anticipated the Python method of ingesting all data before processing rather than input-process-output. If possible, please have the GUI test for a locked output file PRIOR to processing and prompt for Try Again? YN, allowing the user to unlock from another program (e.g. Excel). The existing fatal error check at the end of processing should remain in case the user locks the file during processing.
Similarly, if the system-generated report file exists, it should prompt Overwrite? YN. (This file name is generated by appending _rpt to the input file name.) Check prior to processing from the GUI. From the pseudocode:
// open report file for input to test existance
fName = (“%sReport.txt”, configDat.files.input_fname)
open rptFile with fName as read text
if (open successful) // file exists
response = PopupYN(“File %s exists. Overwrite?)
if (response = No)
abandon call to processing
else
continue to processing // where Python will overwrite
The test for a locked output file occurs at the end of processing, which can unfortunately be after an hour or two of processing. When designing the system, I hadn't anticipated the Python method of ingesting all data before processing rather than input-process-output. If possible, please have the GUI test for a locked output file PRIOR to processing and prompt for Try Again? YN, allowing the user to unlock from another program (e.g. Excel). The existing fatal error check at the end of processing should remain in case the user locks the file during processing.
Similarly, if the system-generated report file exists, it should prompt Overwrite? YN. (This file name is generated by appending _rpt to the input file name.) Check prior to processing from the GUI. From the pseudocode:
// open report file for input to test existance
fName = (“%sReport.txt”, configDat.files.input_fname)
open rptFile with fName as read text
if (open successful) // file exists
response = PopupYN(“File %s exists. Overwrite?)
if (response = No)
abandon call to processing
else
continue to processing // where Python will overwrite