File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1313
1414_PKG_NAME = "fosslight_binary"
1515
16-
17-
1816def get_terminal_size ():
1917 size = shutil .get_terminal_size ()
2018 return size .lines
2119
20+
2221def paginate_file (file_path ):
2322 lines_per_page = get_terminal_size () - 1
2423 with open (file_path , 'r' ) as file :
2524 lines = file .readlines ()
2625
2726 for i in range (0 , len (lines ), lines_per_page ):
2827 os .system ('clear' if os .name == 'posix' else 'cls' )
29- print ('' .join (lines [i : i + lines_per_page ]))
28+ print ('' .join (lines [i : i + lines_per_page ]))
3029 if i + lines_per_page < len (lines ):
3130 input ("Press Enter to see the next page..." )
3231
@@ -106,7 +105,7 @@ def main():
106105 source_file = os .path .join (data_path , ff , 'r' , encoding = 'utf8' )
107106 destination_file = os .path .join (base_path , ff , 'w' , encoding = 'utf8' )
108107 paginate_file (source_file )
109- shutil .copyfile (source_file , destination_file )
108+ shutil .copyfile (source_file , destination_file )
110109 sys .exit (0 )
111110
112111 timer = TimerThread ()
You can’t perform that action at this time.
0 commit comments