[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-db-sig
Subject:    [DB-SIG] Connecting to PoPy via Python
From:       chris () onca ! catsden ! net (chris () onca ! catsden ! net)
Date:       2001-03-27 4:19:47
Message-ID: Pine.LNX.4.30.0103262018300.6202-100000 () onca ! catsden ! net
[Download RAW message or body]

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++



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic