We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ac65fd commit 7fbc0c3Copy full SHA for 7fbc0c3
src/fosslight_binary/cli.py
@@ -14,23 +14,23 @@
14
_PKG_NAME = "fosslight_binary"
15
16
17
-def get_terminal_size():
+def get_terminal_size():
18
size = shutil.get_terminal_size()
19
return size.lines
20
21
22
-def paginate_file(file_path): #, lines_per_page=25):
+def paginate_file(file_path):
23
lines_per_page = get_terminal_size() - 1
24
with open(file_path, 'r') as file:
25
lines = file.readlines()
26
-
+
27
for i in range(0, len(lines), lines_per_page):
28
os.system('clear' if os.name == 'posix' else 'cls')
29
print(''.join(lines[i: i + lines_per_page]))
30
if i + lines_per_page < len(lines):
31
input("Press Enter to see the next page...")
32
33
34
def main():
35
global windows
36
path_to_find_bin = ""
0 commit comments