-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
88 lines (79 loc) · 2.27 KB
/
main.py
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
from Register import register,login
from Searching_BFS import search
from Recommendations_backtracking import recommendations
from Ascii_art import title
from update_file import update
import os
import msvcrt as m
def wait():
print("\nEnter to continue .... ")
m.getch()
while True:
os.system('cls')
title()
print("\n\n")
print("1. REGISTER ")
print("2. LOGIN ")
print("3. Exit \n ")
ch=input("Enter your choice ")
os.system('cls')
pk=None
if ch=="1":
register()
continue
elif ch=="2":
pk=login()
#print(pk)
while pk:
os.system('cls')
pk.display_details()
print("\n\n")
print("1. Search a Friend ")
print("2. Recomendations ")
print("3. Followers ")
print("4. Following ")
print("5. Logout \n")
chh=input("Enter your choice ")
if chh=="1":
while True:
os.system('cls')
print("\n\n")
print("1. Search by Name or Number ")
print("2. Go back \n")
chhh=input("Enter your choice ")
if chhh=="1":
name= input("Enter Name or Number to be searched - ")
search(name,pk)
elif chhh=="2":
break
else:
print("Wrong Input \n\n")
elif chh=="2":
os.system('cls')
recommendations(pk)
elif chh=="3":
os.system('cls')
pk.display_followers()
elif chh=="4":
os.system('cls')
pk.display_following()
elif chh=="5":
os.system('cls')
update(pk)
print("Logging Out \n")
break
else:
print("Wrong Input ")
wait()
continue
wait()
else:
wait()
continue
elif ch=="3":
print("Good Bye ")
exit()
else:
print("Wrong Input \n")
continue
wait()