If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Unanswered: Python to access Postgres (pygresql)

Can someone please let me know how I can connect to an external PG database through Python? (using pygresql or any other library -please specify which lib you use). I am at total loss; there's no useful tutorial on how to do this! There's only one example on the whole 'net (the bike rider club) which is not helpful.

I just need that small piece of code that would let me connect to, say, sql.abc.net with username 'bob' and password '123' and dbname='mydb'.

I already have installed the client version of PG 8.2. Haven't made any changes to the .conf files.