Re: Python and 8.0 beta

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Clodoaldo Pinto Neto <clodoaldo_pinto(at)yahoo(dot)com(dot)br>
Subject: Re: Python and 8.0 beta
Date: 2004-08-24 11:19:15
Message-ID: 412B2433.6040305@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Clodoaldo Pinto Neto wrote:

>>Are there any python drivers that work with the version 8 beta?
>>
>>The version seven ones didn't.
>
>
> This script is working with version 7.4.2, FC2, python 2.3.3
>
> [SNIP]

May you test the following script and let me know which error you are encountering:

#!/usr/bin/python

import pgdb

if ( __name__ == "__main__") :
connection = pgdb.connect(
user = 'user',
password = 'password',
host = '127.0.0.1',
database = 'database')

if ( connection == None):
raise "Could Not Connect"

cursor = connection.cursor()
cursor.execute ( 'select version()' )
result = cursor.fetchall()
cursor.close()

while ( type(result) is type([]) ):
result = result[ 0 ]

print result

this is working correctly on my 8.0beta1 installation

Regards
Gaetano Mendola

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Secrétariat 2004-08-24 11:53:38 Re: No connection to a PG 8.0 Beta 1 win32 server
Previous Message Gaetano Mendola 2004-08-24 11:13:40 Re: Connection to a PG 8.0 Beta 1 win32 server