I am trying to connect to a Postgres Database with variables like this:
cs = "dbname=%s user=%s password=%s host=%s port=%s",(dn,du,dp,dh,dbp)
con = None
con = psycopg2.connect(cs)
However I get the error message:
TypeError: argument 1 must be string, not tuple
I need to be able to use variables in the connection string. Anyone know how to accomplish this?