Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

Login script using Python and SQLite

user = raw_input "User:"
pswd = getpass.getpass "Password"

db = sqlite3.connect('/SABB/DATASETS/SENHAS')
c = db.cursor()
c.execute('SELECT * from sabb WHERE usuario="%s" AND senha="%s"' % (user, pswd))
if c.fetchone() is not None:
    print "Welcome"
else:
    print "Login failed"
Comment

PREVIOUS NEXT
Code Example
Python :: pandas dataframe drop rows with -ve in column value 
Python :: docker opencv python libGL.so.1: cannot open shared object file: No such file or directory 
Python :: expand alphabets in python 
Python :: pandas df by row index 
Python :: convert float to string python 
Python :: dictionary in python 
Python :: send dm to user discord.py 
Python :: python find if strings are anagrams 
Python :: regularization pytorch 
Python :: repr() in python 
Python :: isnotin python 
Python :: pandas value in series 
Python :: Use a callable instead, e.g., use `dict` instead of `{}` 
Python :: add gaussian noise python 
Python :: Aggregate on the entire DataFrame without group 
Python :: python how to extract a string from another string 
Python :: how to check if python is installed on mac 
Python :: Normalize columns in pandas dataframe 
Python :: list all files in python 
Python :: python get names of input arguments 
Python :: fizz buzz in python 
Python :: create python package 
Python :: python treemap example 
Python :: python how to inspect pyd for functions 
Python :: factorial program in python 
Python :: convert excel workbook to dataframe 
Python :: reply to a message discord.py 
Python :: random integer 
Python :: casting in python 
Python :: SUMOFPROD1 codechef solution 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =