Skip to content

Commit 3590885

Browse files
author
Benitz Original
committed
Fixing errors, and added os clear.
1 parent 4d934e8 commit 3590885

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

Boot/boot.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import os
2+
import sys
23

3-
print("""
4+
def get_clear_command():
5+
clear_command = {
6+
"win32": "cls",
7+
"linux": "clear"
8+
}
9+
return clear_command[sys.platform]
10+
11+
def clear():
12+
os.system(get_clear_command())
13+
print("""
414
____
515
/ __ \__ ______ ___ _ __
616
/ /_/ / / / / __ \/ _ \| |/_/
@@ -15,7 +25,7 @@ def boot():
1525

1626
else:
1727
done_count = 0
18-
file = open("pypi.txt", "r")
28+
file = open("./pypi.txt", "r")
1929
line_count = 0
2030
for line in file:
2131
if line != "\n":
@@ -24,7 +34,7 @@ def boot():
2434
for content in file.readlines():
2535
os.spawnl(os.P_DETACH, f'pip install {content}')
2636
done_count = done_count + 1
27-
os.system("clear")
37+
os.system(get_clear_command())
2838
print(f"""
2939
____
3040
/ __ \__ ______ ___ _ __
@@ -38,4 +48,5 @@ def boot():
3848
with open('.installed', 'w') as f:
3949
f.write('Pynex installed pypi packages.')
4050

51+
clear()
4152
boot()

0 commit comments

Comments
 (0)