def change_password(self): password = ask_string('Password', 'Enter your new password') if password is not None: password = password.strip() if not password or not password.isalnum(): Notification('invalid password').start() return self.__d.get_my_cursor().execute('UPDATE users SET password="******" WHERE name=%s', (self.__me[1:],)) Info('password has been changed successfully to '+password).start()
def entry_font_color(self): try: color = ask_string('font color', 'write a color') if color == 'available colors': Available(self.__root) return if color == 'default': color = '#FB2412' self.__e1.configure(fg=color, insertbackground=color) self.add_color_db(color, 'input_font_color') except: Notification("This color doesn't exist").start()
def root_background_color(self): try: color = ask_string('background color', 'write a color') if color == 'available colors': Available(self.__root) return if color == 'default': color = '#025E73' self.__root.configure(background=color) self.add_color_db(color, 'root_background_color') except: Notification("This color doesn't exist").start()