[DB-SIG] Connecting to PoPy via Python

chris@onca.catsden.net chris@onca.catsden.net
Mon, 26 Mar 2001 20:19:47 -0800 (PST)


On Mon, 26 Mar 2001, Nides wrote:

> Hello!
>
> I am attempting to connect to PoPy via Python.. However I don't think I am making a connection.
>
> The following is the code that I am using to connect to PoPy in Python:
>
> import PoPy
>
> db = PoPy.connect('dbname=supplydb host=thales port=5432 user=david')
>
> cr = db.cursor()
> cr.execute('::::whatever:::')
>
> ...Thats what I am doing. If you have any comments, or suggestions I would highly appreciate them!!!

Not played with PoPy yet (been using PyGresSQL myself), but aren't you
supposed to do something like this, instead:

db = PoPy.connect( dbname='supplydb', host='thales', port=5432,
user='david' )

The first way seems... very PHPish... eww :)


   ("`-/")_.-'"``-._        Ch'marr, a.k.a.
    . . `; -._    )-;-,_`)  Chris Cogdon <chmarr@furry.org.au>
   (v_,)'  _  )`-.\  ``-'
  _.- _..-_/ / ((.'       FC1.3: FFH3cmA+>++C++D++H++M++P++R++T+++WZ++Sm++
((,.-'   ((,/   fL               RLCT acl+++d++e+f+++h++i++++jp-sm++