Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

The way to develope a graphical application to manage a Postgres database

125 views
Skip to first unread message

Csanyi Pal

unread,
Aug 2, 2012, 2:24:36 PM8/2/12
to pytho...@python.org
Hi,

I'm new to python.

I'm searching for a way to develope a Python graphical application for a
Postgresql database.

I have installed on my Debian GNU/Linux testing/sid system many python
packages, among others:
eric, geany, idle, ninja-ide, pida (it doesn't work here), python2.7,
python-easygui, python-forgetsql, python-gasp, python-glade2,
python-gobject-2, python-gtk2, python-pip, python-pygresql,
python-pyside.qtsql, python-subversion, python-tk, python-wxglade,
spyder, python3-psycopg2, python-psycopg2, XRCed.

I did search in the Google but can't find any good tutorial except for
wxpython tutorial: http://wiki.wxpython.org/FrontPage,
wxGlade tutorial: http://wiki.wxpython.org/WxGladeTutorial

There is a tutorial for using python-psycopg2 here:
http://wiki.postgresql.org/wiki/Psycopg2_Tutorial

Still I don't know how to put these all together?

XRCed is the most interesting way for me.

Can one advices me where to go?

--
Regards from Pal

Csanyi Pal

unread,
Aug 2, 2012, 5:13:52 PM8/2/12
to pytho...@python.org
Verde Denim <tdl...@gmail.com> writes:

> Sounds like you have enough pieces-parts... is it a question of the
> development process?

Yes, it is.

First question is about GUI.

Say I start to create a GUI with XRCed for such an application for
managing a concrete postgresql database.

On a Frame (window) which object should I draw to get a Table of the
database when I write the code?

If I want to use say python-pygresql to connect to the database then I
must study the http://www.pygresql.org/pg.html documentation and after
that I must to write code to connect it with the GUI.

Is on the Internet such a tutorial that can help me in this effort?

--
Regards from Pal

Message has been deleted

Mark Lawrence

unread,
Aug 2, 2012, 5:40:12 PM8/2/12
to pytho...@python.org
Start here? http://zetcode.com/

--
Cheers.

Mark Lawrence.

Csanyi Pal

unread,
Aug 2, 2012, 5:42:48 PM8/2/12
to pytho...@python.org
Dennis Lee Bieber <wlf...@ix.netcom.com> writes:

> On Thu, 02 Aug 2012 20:24:36 +0200, Csanyi Pal <csan...@gmail.com>
> declaimed the following in gmane.comp.python.general:
>>
>> I'm searching for a way to develope a Python graphical application for a
>> Postgresql database.
>>
> A predefined database, or a general access module?

A predefined, already existing database.

>> I have installed on my Debian GNU/Linux testing/sid system many python
>> packages, among others:
>> eric, geany, idle, ninja-ide, pida (it doesn't work here), python2.7,
>> python-easygui, python-forgetsql, python-gasp, python-glade2,
>> python-gobject-2, python-gtk2, python-pip, python-pygresql,
>> python-pyside.qtsql, python-subversion, python-tk, python-wxglade,
>> spyder, python3-psycopg2, python-psycopg2, XRCed.
>>
> Well... I'd suggest figuring out which GUI toolkit you want to
> use... You have GTK, Tk, I'd say Wx but you didn't list wxpython. You
> also have two competing PostgreSQL adapters -- pick one...

I just installed wxpython packages:
wx2.8-i18n, python-wxgtk2.8, python-wxtools.

> Eric, geany, and idle are all editor/development environments and
> not directly related to what the application itself runs.
>
> For a predefined database, you may just want to explore Dabo. For a
> general access (eg; one where you tell the program which PostgreSQL
> database to connect to, and it extracts the schema information from the
> database at run-time) you'll need to study the advanced features of the
> database engine and adapter.

I'm exploring now Dabo.

--
Regards from Pal

Chris Angelico

unread,
Aug 2, 2012, 5:58:12 PM8/2/12
to pytho...@python.org
On Fri, Aug 3, 2012 at 4:24 AM, Csanyi Pal <csan...@gmail.com> wrote:
> I'm searching for a way to develope a Python graphical application for a
> Postgresql database.

There's two quite separate parts to this:

* Develop a Python graphical application
* Develop a Python application [to access] a PostgreSQL database.

I recommend you tackle them separately, and only put them together
once you're confident with each part on its own. Pick a GUI toolkit
and make a "Hello, world". That might take you quite a while, and it
isn't helped by trying to mix in an unfamiliar database.

That said, I do commend your choices of language and DB. :) All the best!

ChrisA

Wolfgang Keller

unread,
Aug 5, 2012, 7:44:48 AM8/5/12
to
> Can one advices me where to go?

There are a number of Python frameworks for GUI database applications:

- Dabo (wxPython)
- Sqlkit (PyGTK & SQLalchemy)
- Pypapi (PyQt & SQLalchemy)
- Camelot (PyQt & SQLalchemy)
- Qtalchemy (PyQt & SQLalchemy)
- Openobject (PyGTK)
- Defis (wxPython & SQLalchemy), Russian only
- Kiwi (PyGTK)

Not sure whether these are still active:

- Gnuenterprise (wxPython)
- Pythoncard (wxPython)

Sincerely,

Wolfgang Keller

Walter Hurry

unread,
Aug 5, 2012, 11:47:31 AM8/5/12
to
On Thu, 02 Aug 2012 20:24:36 +0200, Csanyi Pal wrote:

> I'm searching for a way to develope a Python graphical application for a
> Postgresql database.

I use wxGlade/wxPython to build the GUI, and then hand code the database
access using psycopg2 into the generated application. Works very well for
me, but I do know SQL and Postgres.

Csanyi Pal

unread,
Aug 5, 2012, 11:58:46 AM8/5/12
to pytho...@python.org
Well, I tried out many adviced ways but none of them works on my Debian
GNU/Linux testing/sid system. Always get some error in one of the part
of the software.

Can you give a short tutorial for newbies how to start to develope with
tools you used successfully?

--
Regards from Pal

Walter Hurry

unread,
Aug 5, 2012, 12:25:33 PM8/5/12
to
On Sun, 05 Aug 2012 17:58:46 +0200, Csanyi Pal wrote:

> Well, I tried out many adviced ways but none of them works on my Debian
> GNU/Linux testing/sid system. Always get some error in one of the part
> of the software.
>
> Can you give a short tutorial for newbies how to start to develope with
> tools you used successfully?

I'm afraid I'm not about to write a tutorial - there are better ones out
there than I could produce; easily found.

I just DuckDuckGo'ed, followed the tutorials and read the documentation.

Mark Lawrence

unread,
Aug 5, 2012, 2:21:16 PM8/5/12
to pytho...@python.org
On 05/08/2012 16:58, Csanyi Pal wrote:
> Well, I tried out many adviced ways but none of them works on my Debian
> GNU/Linux testing/sid system. Always get some error in one of the part
> of the software.

If you give precise details by cutting and pasting the error people will
be able to help.

>
> Can you give a short tutorial for newbies how to start to develope with
> tools you used successfully?
>

Seek and ye shall find!!!

--
Cheers.

Mark Lawrence.

Csanyi Pal

unread,
Aug 5, 2012, 2:26:55 PM8/5/12
to pytho...@python.org
Mark Lawrence <bream...@yahoo.co.uk> writes:

> On 05/08/2012 16:58, Csanyi Pal wrote:
>> Walter Hurry <walte...@lavabit.com> writes:
>>
>> Well, I tried out many adviced ways but none of them works on my Debian
>> GNU/Linux testing/sid system. Always get some error in one of the part
>> of the software.
>
> If you give precise details by cutting and pasting the error people
> will be able to help.

I shall do that later.

>> Can you give a short tutorial for newbies how to start to develope with
>> tools you used successfully?
>>
> Seek and ye shall find!!!

Ye, if I find spare time I shall do that certainly.

--
Regards from Pal

rusi

unread,
Aug 7, 2012, 12:03:46 AM8/7/12
to
On Aug 5, 11:26 pm, Csanyi Pal <csanyi...@gmail.com> wrote:
> Mark Lawrence <breamore...@yahoo.co.uk> writes:
> > On 05/08/2012 16:58, Csanyi Pal wrote:
> >> Walter Hurry <walterhu...@lavabit.com> writes:
>
> >>> On Thu, 02 Aug 2012 20:24:36 +0200, Csanyi Pal wrote:
>
> >>>> I'm searching for a way to develope a Python graphical application for a
> >>>> Postgresql database.
>
> >>> I use wxGlade/wxPython to build the GUI, and then hand code the database
> >>> access using psycopg2 into the generated application. Works very well for
> >>> me, but I do know SQL and Postgres.
>
> >> Well, I tried out many adviced ways but none of them works on my Debian
> >> GNU/Linux testing/sid system. Always get some error in one of the part
> >> of the software.
>
> > If you give precise details by cutting and pasting the error people
> > will be able to help.
>
> I shall do that later.

Chris already suggested that you try GUI without DBMS and DBMS without
GUI first before trying the two together.
One way of subverting the DBMS-stage (its called mocking nowadays!) is
to use sqlite instead of a full-scale DBMS like postgres. After that
works you can switch to postgres.
0 new messages