-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path2bootloader.py
More file actions
32 lines (29 loc) · 896 Bytes
/
2bootloader.py
File metadata and controls
32 lines (29 loc) · 896 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import os, time, sys
from pathlib import Path
os.system("cls" if os.name=="nt" else "clear")
os.chdir(Path(__file__).parent)
def check(noprint=None):
if os.path.exists("users"):
if not any(os.scandir("users")):
os.system("python3 3login.py register")
else:
if not noprint == True:
print("""[1] Login
[2] Create new user
[exit] Exit
""")
option = input("\n[]: ")
if option=="exit":
os.system("su -c \"shutdown -h now\"")
elif option=="1":
os.system("python3 3login.py login")
elif option=="2":
os.system("python3 3login.py register")
else:
print("Invalid Option.")
time.sleep(1.5)
check(noprint=True)
else:
os.mkdir("users")
check()
check()