Hi,
I wrote a Python scripts, i need to connect this with my database in postgresql, but while running the __init__.py it gives the message that unable to connect to database. Please guide me. my code is as follow...
try:
conn=psycopg2.c onnect("dbname= "+ dbname + "user=" + username + "password=" + password)
print"connected "
except:
print "I am unable to connect to the database, exiting."
sys.exit()
I wrote a Python scripts, i need to connect this with my database in postgresql, but while running the __init__.py it gives the message that unable to connect to database. Please guide me. my code is as follow...
try:
conn=psycopg2.c onnect("dbname= "+ dbname + "user=" + username + "password=" + password)
print"connected "
except:
print "I am unable to connect to the database, exiting."
sys.exit()
Comment