Guest User

Untitled

a guest
Feb 8th, 2018
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. UserName = ""
  2. PassWard = ""
  3. DataBase = ""
  4.  
  5. def LoginDB(self):
  6.  
  7. self.UserName = input("Username: ")
  8.  
  9. os.system("cls")
  10.  
  11. self.PassWard = getpass.getpass("Passward")
  12.  
  13. os.system("cls")
  14.  
  15. self.DataBase = input("DataBase:")
  16.  
  17. self.ConectDB()
  18.  
  19. def ConectDB(self):
  20.  
  21. os.system("cls")
  22.  
  23. conexao = mysql.connector.connect(user = self.Username, password = self.Passward, host = "127.0.0.1", database = self.DataBase )
  24.  
  25. os.system("pause")
Add Comment
Please, Sign In to add comment