@@ -840,14 +840,6 @@ def append_file_data(self):
840840 finally :
841841 # Always restart the watcher after an append operation.
842842 self .start_file_watcher ()
843-
844- def _read_new_lines (self , filepath , file_info ):
845- """Reads new lines from the end of a file."""
846- with open (filepath , 'r' , encoding = 'utf-8' , errors = 'ignore' ) as f :
847- f .seek (file_info ['size' ])
848- new_lines = f .readlines ()
849- return new_lines
850-
851843 def _parse_and_append_new_data (self , new_lines , file_info ):
852844 """Parses new lines and appends them to the data cache."""
853845 if not new_lines :
@@ -936,7 +928,9 @@ def _plot_file_data(self, filepath, x_col, y_col):
936928 plot_y = raw_y [finite_mask ]
937929
938930 if plot_x .size > 0 :
939- label_text = f"{ y_col } vs { x_col } ({ filename } )" if len (self .file_ui_elements ) > 1 else f"{ y_col } vs { x_col } "
931+ label_text = (f"{ y_col } vs { x_col } ({ filename } )"
932+ if len (self .file_ui_elements ) > 1
933+ else f"{ y_col } vs { x_col } " )
940934 self .ax_main .plot (
941935 plot_x ,
942936 plot_y ,
@@ -1042,11 +1036,6 @@ def check_for_updates(self):
10421036 self .log (
10431037 "File watcher stopped: file is inaccessible or has been deleted." )
10441038 self .stop_file_watcher ()
1045-
1046-
1047-
1048-
1049-
10501039if __name__ == '__main__' :
10511040 # This is ESSENTIAL for multiprocessing to work in a bundled executable
10521041 # and to prevent pickling errors with 'spawn' start method on Windows.
0 commit comments