Re: Python and 8.0 beta

Поиск
Список
Период
Сортировка
От Gaetano Mendola
Тема Re: Python and 8.0 beta
Дата
Msg-id 412B2433.6040305@bigfoot.com
обсуждение исходный текст
Ответ на Re: Python and 8.0 beta  (Clodoaldo Pinto Neto <clodoaldo_pinto@yahoo.com.br>)
Список 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











В списке pgsql-general по дате отправления:

Предыдущее
От: Gaetano Mendola
Дата:
Сообщение: Re: Connection to a PG 8.0 Beta 1 win32 server
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_dump in stand alone backend