Re: Adventures in Quest for GUI RAD

From: Marco Colombo <pgsql(at)esiway(dot)net>
To: Typing80wpm(at)aol(dot)com
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Adventures in Quest for GUI RAD
Date: 2005-05-10 14:39:46
Message-ID: 1115735986.12922.236.camel@Frodo.esi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, 2005-05-10 at 01:51 -0400, Typing80wpm(at)aol(dot)com wrote:
> Wolfgang, thanks! I am very persuaded by your arguments regarding
> Python. What you have written makes me look at Python in a different
> light.
>
> I happened to find a download of Python2.2 which I installed at work
> but have not tried out. I wish I could find detailed instructions on
> WHICH python to download from WHERE, and what I would need to download
> to access Postgresql from Python, and then some simple examples of
> sending a query to postgres and processing the results.

2.2? Latest python is 2.4.1.

First place to look at is obviously:
http://www.python.org/

see the Download section.

To access PostgreSQL from Python, you have some choices, pros and cons
have been already discussed on this list. Here's a partial list of
options:

http://www.druid.net/pygresql/
I've used this, happily, under Linux. It may be already included in the
PostgreSQL Windows port, I don't know.

http://initd.org/projects/psycopg1
I've used this too, happily, again under Linux. My programs where simple
enough that I could switch from one driver to the other w/o touching the
rest of the application, since I'm using the DBI 2.0 interface.
I have no idea if there's a Win port of this driver.

There are other drivers, but I haven't used them. Have a look at:
http://www.python.org/pypi?%3Aaction=browse
(under the Database section).

For DBI, or DB-API, see: http://www.python.org/peps/pep-0249.html
It's a reference manual and not a tutorial, and it's not PostgreSQL
specific.

While we're at it (and completely unrelated and off-topic) have a look
at:

http://www.pcpm.ucl.ac.be/~gustin/win32_ports/

> I would be perfectly happy to work with it in that funny DOS window, I
> would not require that it be Windows GUI app. Just to be able to read
> and write to Postgresql. Do you think there is such a
> tutorial/documentation.

Python for Windows has a nice console window (IDLE I think).

You should be able to find some examples via Google.

.TM.
--
____/ ____/ /
/ / / Marco Colombo
___/ ___ / / Technical Manager
/ / / ESI s.r.l.
_____/ _____/ _/ Colombo(at)ESI(dot)it

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jimmie H. Apsey 2005-05-10 15:07:06 pg_dump fails on 7.4 Postgres
Previous Message Jimmie H. Apsey 2005-05-10 14:34:12 pg_dump problem Postgres 7.4