Python + MySQL + qt

Gerhard Häring gerhard.nospam at bigfoot.de
Wed Feb 28 22:54:53 EST 2001


Jacek Pop³awski wrote:
> 
> I have a school project: create database and write application which will use
> it (I am not sure what exactly it will do, yet), it should have graphical menu
> and be user friendly. I can choose tool. I am thinking about MySQL or
> Postgresql (probably MySQL) and qt/gtk+ as toolkit (probably qt).

If the database is not very complex, it wouldn't matter which one you
choose. If the database server should run on Windows, too, I'd use MySQL
or Interbase, not Postgres.

> I am much more experienced in C than in Python, but I like this language and I
> think it will be next step to learn it more.
> And now questions:
> - is Python good choice here? what troubles will I have?

Python is sure an excellent choice here. Python is very good at
integrating things. Troubles? Probably lack of (good) documentation. For
Python and databases, you might want to check out the database topic
guide on the Python homepage.

> - what libraries will I need except pygtk or pyqt?

The appropriate database module for the database you choose. For MySQL,
there is MySQLdb (http://dustman.net/andy/python/MySQLdb/) For
PostgreSQL, there are several. I use PyGreSQL
(http://www.druid.net/pygresql/).

> - I am programming only in Linux, is it possible to run my application in
>   Windows, without any code fixes? are needed libraries available for Win?

The Python database modules MySQLdb and PyGreSQL (for PostgreSQL) are
available for Windows at my homepage (see below).
I have a bookmark for pyGTK on win32, for the case you want to go with
GTK: http://www.hans.breuer.org/ports/

I am quite a fan of wxPython. It's a very powerful library, and quite
easy to program. OK, it's not Visual Basic (yet), but who wants Visual
Basic, anyway ;-)

Gerhard

PS: Some of the modules you need might be already included in your Linux
distribution. I have SuSE, and it includes most of the above mentioned
Python modules.
-- 
Sorry for the fake email, please use the real one below to reply.
contact: g e r h a r d @ b i g f o o t . d e
web:     http://highqualdev.com



More information about the Python-list mailing list