-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
30 lines (25 loc) · 688 Bytes
/
Copy pathapp.py
File metadata and controls
30 lines (25 loc) · 688 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
import os
from server.server import start_server
from client.client import start_client
from colorama import init, Fore
init()
def clear_console():
os.system('cls' if os.name == 'nt' else 'clear')
def main():
while True:
clear_console()
print("Select mode:")
print("1. Server")
print("2. Client")
option = input("Option: ")
if option == '1':
start_server()
break
elif option == '2':
start_client()
break
else:
clear_console()
print(Fore.RED + "[ERROR] Invalid option. Please try again." + Fore.RESET)
if __name__ == "__main__":
main()