10.7.1. Class cerebro.gui.AccountDialog¶
AccountDialog(title, label='', store_key='')¶
Credentials input dialogue class.
daccount = cerebro.gui.account_dialog('Example', 'Enter your login and password', 'store_key') res = daccount.execute() if res == True: print('Login and password entered by user:', daccount.login(), daccount.password()) daccount.store('store_key') # saving the password for future calls
Returns: True, if the user entered login and password and pressed “OK” button or if the login and password were saved earlier. Return type: bool
Displays a dialog window.
If the login and password were saved during a previous call, the dialog window is not displayed, “True” returns, and then you can resolve the login and password by using the following methods:
The dialog saves login and password by a text key for the desired period of time. To restore a previously saved password, pass the key used for saving to the dialog constructor.
All passwords are stored in encrypted form.