forked from vincentimba/shenlan_xauat
-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
30 lines (26 loc) · 1.04 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
from xauat_login import XauatLogin
from getpass import getpass
if __name__ == '__main__':
username = str(input('请输入sep mail address:'))
passwd = str(getpass('请输入密码(will not be displayed): '))
a = XauatLogin(username=username,
password=passwd)
while 1:
print('\n{: ^28}'.format('请输入指令'))
print('{:-^31}'.format(''))
print('{: ^15}'.format('1') + '-' + '{: ^15}'.format('登录'))
print('{: ^15}'.format('2') + '-' + '{: ^15}'.format('注销'))
print('{: ^15}'.format('3') + '-' + '{: ^15}'.format('状态'))
print('{: ^15}'.format('4') + '-' + '{: ^15}'.format('退出'))
print('{:-^31}\n'.format(''))
command = str(input(''))
if command == '1':
a.log_in()
elif command == '2':
a.log_out()
elif command == '3':
a.get_login_info()
elif command == '4':
exit()
else:
print('\n{: ^28}'.format('格式错误'))