Note that there are some explanatory texts on larger screens.

plurals
  1. POPython3 Passwords gives me a loop
    text
    copied!<p>while making a script i got some weird beheiviour form the python3 interpreter the bug is simply this i enter the right UserName and Password i am granted with an infinite loop that has no condition</p> <pre><code>def LoginAdmin(): # 3 chances seulement ... LoginTrial = 3 position=0 AdminOK=0 AdminCheck=[] PassCheck = open('Data_LoginAdmin', 'r') #lecture des lignes et mise en données les informations mdp et login for ligne in PassCheck: print(ligne, end='') words = ligne.split(":") AdminCheck.append(words) print(AdminCheck) PassCheck.close() LoginAdminAcces = True while (((LoginTrial != 0) or (AdminOK == True))): UserAdminName=input("Identification : ") if not UserAdminName.isalpha: LoginTrial = LoginTrial - 1 print("Autentification Échouer essai restant : ", LoginTrial) elif UserAdminName != AdminCheck[0][0]: LoginTrial = LoginTrial - 1 print("Autentification Échouer essai restant : ", LoginTrial) elif UserAdminName == AdminCheck[0][0]: while (((LoginTrial != 0) or (AdminOK == True))): UserAdminPass=input("Mot de pass : ") if not UserAdminName.isalpha: LoginTrial = LoginTrial - 1 print("Autentification Échouer essai restant : ", LoginTrial) elif UserAdminPass != AdminCheck[0][1]: LoginTrial = LoginTrial - 1 print("Autentification Échouer essai restant : ", LoginTrial) elif UserAdminPass == AdminCheck[0][1]: LoginAdminAcces = True AdminOK=True print(AdminOK) print("Accès apprové ...") if LoginTrial == 0: print("Accès Refusé !!!") LoginAdminAcces = False return (LoginAdminAcces) </code></pre> <p>this is the file Data_LoginAdmin</p> <pre><code>Admin:AdminPass </code></pre> <p>if someone see why it will save my life ... kind of ...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload