Skip to content

Commit e63533d

Browse files
committed
Hide password when typing
1 parent 8752290 commit e63533d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from course import Config, EAMS
22
from configparser import ConfigParser
3+
from getpass import getpass
34
import sys
45

56
cfg = ConfigParser()
@@ -19,7 +20,7 @@ def pause() -> None:
1920

2021
print('==== CourseTable2ICS for SSPU by ReekyStive ====')
2122
username = input('请输入学号: ').strip()
22-
password = input('请输入密码: ')
23+
password = getpass('请输入密码 (输入时不可见): ')
2324
print()
2425

2526
config = Config(username, password)
@@ -87,7 +88,7 @@ def pause() -> None:
8788
print(f'[{str(item["code"])}] {str(item["name"])}')
8889
print()
8990

90-
date = input('请输入第一周的第一天对应的日期 (e.g. 2021-08-02): ').strip()
91+
date = input('请输入第一周的第一天对应的日期 (e.g. 2021-09-13): ').strip()
9192

9293
while True:
9394
if len(date.split('-')) == 3:

0 commit comments

Comments
 (0)