Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

create log in python

logging.basicConfig(filename="logfilename.log", level=logging.INFO)
# Log Creation

logging.info('your text goes here')
logging.error('your text goes here')
logging.debug('your text goes here')
Comment

create login system in python

def Login():
  while (loop == 'true'):
      username = input("Please enter your username: ")
      if (username == CorrectUsername):
          password = input("Please enter your password: ")
          if (password == CorrectPassword):
              print("Logged in successfully as ") + username
              loop = 'false'
          else:
              print "Password incorrect!"
      else:
          print "Username incorrect!"
Comment

PREVIOUS NEXT
Code Example
::  
:: select rows in python 
::  
Python ::  
::  
::  
Python ::  
::  
::  
Python ::  
Python ::  
::  
::  
Python ::  
:: why to use self in python 
::  
:: check for string in list python 
Python ::  
Python :: hugging face change directory model 
::  
Python ::  
Python ::  
Python ::  
::  
::  
Python ::  
Python ::  
::  
::  
:: iterate over a set python 
ADD CONTENT
Topic
Content
Source link
Name
2+9 =