PyQt + PygreSQL

Neil Zanella nzanella at cs.mun.ca
Wed Aug 11 15:19:21 EDT 2004


Grzegorz Dostatni <dostatnig at yahoo.com> wrote in message news:<opscjbgindyendvp at news.srv.ualberta.ca>...

> I don't know how to set it up using pygresql, but you can do it using 
> qtsql module. Just make sure that qt was compiled with the postgresql 
> support.

Thanks, I should have used the Python equivalent of QSqlDatabase::addDatabase()
to connect to PostgreSQL instead of using PyGreSQL. That way QDataTable can
find and use the database connection handle it knows about. After all, PyQt 
knows nothing about PyGreSQL: as you just pointed out the two packages are 
completely unrelated and independent of each other.

> If you need to use pygresql for some reason, you could always try to have 
> multiple connections to the database from you code (one through qtsql 
> module, another through qtsql).

Exactly, but actually now that you pointed this out to me I don't think
I will need PyGreSQL since I'm already using the Qt database module.

Thanks,

Neil



More information about the Python-list mailing list