[Tutor] python, wxpython and postgresql

Eric Walstad eric at ericwalstad.com
Mon Mar 17 22:49:24 CET 2008

Hey Bill,

Bill Mais wrote:
> I'm a newbie to python and would like to build a database app with 
> wxpython and postgresql.

I would suggest you first write the basic app to work from the command
line.  It's easy to debug that way and enables you to focus on the
critical features of your app without wasting much, if any, of your
time.  Once you are able to do the basics from the command line it is
generally easy to wrap it in wxPython.

As Luke said, there are a lot of examples out there on how to read/write
to a postgresql db.  At some point, probably after you try a code
example or two, you may find the DB API pep helpful:
It defines the interface the db adapters (psycopg, for example) are
supposed to provide you.

We are happy to help when you have specific questions, too.



other keyword pointers include:
optparse (makes handling command line options a breeze)
raw_input (get user input from the command line)
psycopg2 (postgresql database adapter)
doctest (document your code with runnable tests)

More information about the Tutor mailing list