-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.py
More file actions
39 lines (35 loc) · 993 Bytes
/
demo.py
File metadata and controls
39 lines (35 loc) · 993 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
33
34
35
36
37
import os
os.system("tput setaf 6")
print("\t\t* * * * * Welcome to Partition Main Menu * * * * * ")
print("\t\t----------------------------------------------------")
os.system("tput setaf 3")
while True:
os.system("clear")
os.system("tput setaf 2")
print("""
\n
Press 1 : To Create Partiton
Press 2 : To Check Disk Space
Press 3 : To see all the information about block devices.
Press 4 : To Back to Main Menu
Press 5 : To Exit
""")
os.system("tput setaf 3")
ch = input("Enter Your Choice : ")
if int(ch) == 1:
os.system("python3 /root/arth/task8/phycial_partition.py ")
elif int(ch) == 2:
os.system("df -h")
elif int(ch) == 3:
os.system("lsblk")
elif int(ch) == 4:
print("Back to Main Menu")
os.system("python3 /root/arth/task8/main.py")
elif int(ch) == 5:
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")