-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenu.py
More file actions
67 lines (60 loc) · 1.66 KB
/
menu.py
File metadata and controls
67 lines (60 loc) · 1.66 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import os
import getpass
os.system("clear")
os.system("tput setaf 6")
print("\t\t* * * * * Welcome to Linux Basic Commands * * * * *")
os.system("tput setaf 7")
print("\t\t---------------------------------------------------")
while True:
os.system("clear")
os.system("tput setaf 6")
print("\t\t* * * * * Welcome to Linux Basic Commands * * * * *")
os.system("tput setaf 7")
print("\t\t---------------------------------------------------")
os.system("tput setaf 3")
print("""
\n
Press 1 : To see Current Time
Press 2 : To Configure Yum repolist
Press 3 : To see attached hdd/storage
Press 4 : To see Total amount of memory
Press 5 : To see the running ports
Press 6 : To check info of Docker
Press 7 : To Open Python Prompt
Press 8 : To Open Calculator
Press 9 : To Open Firefox
Press 10 : To Open Text Editor
Press 11 : To Exit
""")
os.system("tput setaf 7")
ch = input("Enter Your Choice : ")
if int(ch) == 1:
os.system("date +%T")
elif int(ch) == 2:
print(" * * Configuring yum !! * *")
os.system("yum repolist")
elif int(ch) == 3:
print(" * * Listing hard disks/storage !! * *")
os.system("fdisk -l | less")
elif int(ch) == 4:
os.system("free")
elif int(ch) == 5:
os.system("netstat -tnlp")
elif int(ch) == 6:
os.system("docker info | less")
elif int(ch) == 7:
os.system("python3")
elif int(ch) == 8:
os.system("bc")
elif int(ch) == 9:
os.system("firefox")
elif int(ch) == 10:
os.system("gedit")
elif int(ch) == 11:
os.system("tput setaf 7")
exit()
else:
print("Not Supported")
os.system("tput setaf 5")
input("\nPress Enter to continue . . . . . . . . . . . .")
os.system("tput setaf 7")