国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

When python refers to the getpass module, there is no response after entering the password and pressing Enter. It is executed in the pycharm software, but it is OK in the IDE that comes with python.
phpcn_u1582
phpcn_u1582 2017-06-14 10:51:39
0
2
1400

1, python references the getpass module and there is no response after entering the password and pressing Enter

2,

  #!/usr/bin/env python3.5
    #用戶登錄
    import getpass
    i = 1
    user = 'eason'
    pwd = 'eason123'
    while True:
        i1 = input('請輸入賬號:')
        p1 = getpass.getpass('請輸入密碼:')
        if i1 == 'user' and  p1 == 'pwd':
            print('login sucessful')
            break
        else:
            print('login failer')
        if i == 3:
            break
        i = i + 1

3. It is possible to use the IDE that comes with python, but this problem occurs when Pycharm is executed. Thanks!

phpcn_u1582
phpcn_u1582

reply all(2)
Peter_Zhu

getpass uses msvcrt.getch to read the keystrokes, which is invalid in the IDE.

扔個三星炸死你

The original poster’s code: p1 == 'pwd', not 'p1 == pwd'.

if i1 == 'user' and p1 == 'pwd':
    print('login sucessful')
    break
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template