RAD with Python

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ubaidullah Nubar

    RAD with Python

    Hi,

    How well is Python suited for developing database based applications?
    I am new to Python so please bear with me if some of the questions are
    too simple. I specifically have the following questions:

    1. Is there an example of a simple data-entry application written in
    Python using a GUI interface? Something like a simple address book app
    with a listbox displaying all addresses with the ability to
    add/modify/delete.

    2. There seem to be a number of GUI frameworks available? Which one is
    good for use on Windows and Linux?

    3. Can Python apps be compiled to an exe? Can the resulting executable
    be distributed commercially?

    4. What types of applications are not suitable to be written in
    Python?

    I have good knowledge of many languages including C++, Assembler,
    Java, etc. My preferred development tool is Clarion currently. If
    anybody with a Clarion background can share their experience with
    Python, that will be very helpful.

    Appreciate your answers...

    Thanks & Regards,
    Ubaidullah Nubar.
  • P@draigBrady.com

    #2
    Re: RAD with Python

    Ubaidullah Nubar wrote:[color=blue]
    > Hi,
    >
    > How well is Python suited for developing database based applications?
    > I am new to Python so please bear with me if some of the questions are
    > too simple. I specifically have the following questions:
    >
    > 1. Is there an example of a simple data-entry application written in
    > Python using a GUI interface? Something like a simple address book app
    > with a listbox displaying all addresses with the ability to
    > add/modify/delete.[/color]

    Have a look at http://www.netpromi.com/mojoview.html
    It uses gtk
    [color=blue]
    > 2. There seem to be a number of GUI frameworks available? Which one is
    > good for use on Windows and Linux?[/color]

    There is a GTK2 port to windows I think.
    pyqt is also an option, but you need to pay
    to use it on windows.
    wxwindows is another popular crossplatform toolkit.
    Personally I recommend GTK.
    [color=blue]
    > 3. Can Python apps be compiled to an exe? Can the resulting executable
    > be distributed commercially?[/color]

    yep.
    [color=blue]
    > 4. What types of applications are not suitable to be written in
    > Python?[/color]

    CPU intensive apps, or low level bit manipulation is
    better done in C, though you can very easily write parts in C,
    or even use psyco for certain python functions.
    Note python 2.3 is 25% faster than 2.2.
    [color=blue]
    > I have good knowledge of many languages including C++, Assembler,
    > Java, etc. My preferred development tool is Clarion currently. If
    > anybody with a Clarion background can share their experience with
    > Python, that will be very helpful.[/color]

    Pádraig.

    Comment

    • vivek@cs.unipune.ernet.in

      #3
      Re: RAD with Python

      On Fri, Sep 12, 2003 at 06:09:02AM -0700, Ubaidullah Nubar wrote:[color=blue]
      > Hi,
      >
      > How well is Python suited for developing database based applications?[/color]

      U will find python interfaces for almost all mainly used databases.
      And as the nature of Python it is very easy to interact with databases
      in Python.
      [color=blue]
      > I am new to Python so please bear with me if some of the questions are
      > too simple. I specifically have the following questions:
      >[/color]
      [color=blue]
      >
      > 2. There seem to be a number of GUI frameworks available? Which one is
      > good for use on Windows and Linux?[/color]

      If u are new to Python and have no previous experience with C++ then
      I think Tkinter is the best place to start. If you are comfortable
      with C++ then u can use wxPython. (Actually there is no seperate
      documentation for wxPython, it a wrapper around the wxWindows library)
      [color=blue]
      >
      > 3. Can Python apps be compiled to an exe? Can the resulting executable
      > be distributed commercially?
      >[/color]

      Yes, using McMillan and py2exe.
      [color=blue]
      > 4. What types of applications are not suitable to be written in
      > Python?
      >[/color]

      System side softwares
      [color=blue]
      > I have good knowledge of many languages including C++, Assembler,
      > Java, etc. My preferred development tool is Clarion currently. If
      > anybody with a Clarion background can share their experience with
      > Python, that will be very helpful.
      >
      > Appreciate your answers...
      >
      > Thanks & Regards,
      > Ubaidullah Nubar.
      > --
      > http://mail.python.org/mailman/listinfo/python-list[/color]

      Regards
      Vivek Kumar

      Comment

      • John

        #4
        Re: RAD with Python

        On 12 Sep 2003 06:09:02 -0700, Ubaidullah Nubar
        <ubaidullahnuba r@hotmail.com> wrote:
        [color=blue]
        > Hi,
        >
        > How well is Python suited for developing database based applications?
        > I am new to Python so please bear with me if some of the questions are
        > too simple. I specifically have the following questions:
        >
        > 1. Is there an example of a simple data-entry application written in
        > Python using a GUI interface? Something like a simple address book app
        > with a listbox displaying all addresses with the ability to
        > add/modify/delete.
        >
        > 2. There seem to be a number of GUI frameworks available? Which one is
        > good for use on Windows and Linux?
        >
        > 3. Can Python apps be compiled to an exe? Can the resulting executable
        > be distributed commercially?
        >
        > 4. What types of applications are not suitable to be written in
        > Python?
        >
        > I have good knowledge of many languages including C++, Assembler,
        > Java, etc. My preferred development tool is Clarion currently. If
        > anybody with a Clarion background can share their experience with
        > Python, that will be very helpful.
        >
        > Appreciate your answers...
        >
        > Thanks & Regards,
        > Ubaidullah Nubar.
        >[/color]

        My choice would be wxPython. Look at the wxPython demo form plenty of
        source.

        2.
        My personal preference of a Python RAD is Boa Constructor.
        You will need to install wxWindows (www.wxWindows.org) wxPython
        (www.wxPython.org)
        and finally the Boa Constructor itself (boa-constructor.sou rceforge.net).
        The resulting code is portable to unix and maybe mac.

        3.
        py2exe is used to generate executable python programs under windows.
        The resulting code can be freely distrinuted.

        4.
        Python is appox 400 times slower than C.
        If you are doing complex algorithmics on large data sets and a module like
        numpy dosn't accelerate what you need you might be better off with another
        language.
        (Note that for most application the time is spendt in C modules interfaced
        by python.)
        You have to options:
        1. Implement the critical sections in C (the SWIG interface genetrator
        helps grind the C interface to pyhton)
        2. Use another language (My choice.. I use Common Lisp for complex
        algorithmics)


        --
        Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

        Comment

        • Gary Herron

          #5
          Re: RAD with Python

          On Friday 12 September 2003 08:17 am, John wrote:[color=blue]
          > On 12 Sep 2003 06:09:02 -0700, Ubaidullah Nubar
          >
          > <ubaidullahnuba r@hotmail.com> wrote:[color=green]
          > > Hi,
          > >
          > > How well is Python suited for developing database based applications?
          > > I am new to Python so please bear with me if some of the questions are
          > > too simple. I specifically have the following questions:
          > >
          > > 1. Is there an example of a simple data-entry application written in
          > > Python using a GUI interface? Something like a simple address book app
          > > with a listbox displaying all addresses with the ability to
          > > add/modify/delete.
          > >
          > > 2. There seem to be a number of GUI frameworks available? Which one is
          > > good for use on Windows and Linux?[/color][/color]

          I've used Tkinter for cross platform development with great success
          for years, but recently I've been playing with pyGTK (and the
          libraries it is built upon: GTK+, glade-2 and libglade), and
          I like the results very much.

          PyGTK works on both window and Linux/Unix, Comparing the two, it seems
          that PyGTK produces GUI's which look much better, and are *much* more
          responsive. And the GUI building tool, glade-2, is *very* easy and
          convenient to work with.


          New version have just come out in the last several days, so look for
          and install the latest.

          Gary Herron




          Comment

          • Terry Reedy

            #6
            Re: RAD with Python


            "Ubaidullah Nubar" <ubaidullahnuba r@hotmail.com> wrote in message
            news:17d520f6.0 309120509.491e4 d7c@posting.goo gle.com...[color=blue]
            > Hi,
            >
            > How well is Python suited for developing database based[/color]
            applications?[color=blue]
            > I am new to Python so please bear with me if some of the questions[/color]
            are[color=blue]
            > too simple. I specifically have the following questions:
            >
            > 1. Is there an example of a simple data-entry application written in
            > Python using a GUI interface? Something like a simple address book[/color]
            app[color=blue]
            > with a listbox displaying all addresses with the ability to
            > add/modify/delete.[/color]

            I hope someone else answers this.
            [color=blue]
            > 2. There seem to be a number of GUI frameworks available? Which one[/color]
            is[color=blue]
            > good for use on Windows and Linux?[/color]

            Most people prefer the one they use. No surprise. Use google to find
            previous threads on this topic.
            [color=blue]
            > 3. Can Python apps be compiled to an exe?[/color]

            No, Python code cannot currently be compiled to a native code .exe in
            the way you probably mean. Yes, Python bytecode (including included
            modules) can be combined with a copy of the interpreter in a
            distributable .exe, Googling 'Python executable' perhaps with
            'McMillan' (spelling?) should get you previous posts with links.
            [color=blue]
            > Can the resulting executable be distributed commercially?[/color]

            Yes.
            [color=blue]
            > 4. What types of applications are not suitable to be written in[/color]
            Python?

            Hmmm.

            Terry J. Reedy


            Comment

            • John J. Lee

              #7
              Re: RAD with Python

              John <john.thingstad @chello.no> writes:
              [color=blue]
              > On 12 Sep 2003 06:09:02 -0700, Ubaidullah Nubar
              > <ubaidullahnuba r@hotmail.com> wrote:[/color]
              [...][color=blue]
              > 4.
              > Python is appox 400 times slower than C.[/color]
              [...]

              Maybe this was intended to be a silly number, but: this means very
              little. The degree of slowdown is hugely variable from one domain to
              the next, and from one program to the next, and I've never heard
              anyone else quote an indicative figure anywhere near that high.


              John

              Comment

              • Gary Herron

                #8
                Re: RAD with Python

                On Friday 12 September 2003 10:35 am, John J. Lee wrote:[color=blue]
                > John <john.thingstad @chello.no> writes:[color=green]
                > > On 12 Sep 2003 06:09:02 -0700, Ubaidullah Nubar
                > > <ubaidullahnuba r@hotmail.com> wrote:[/color]
                >
                > [...]
                >[color=green]
                > > 4.
                > > Python is appox 400 times slower than C.[/color]
                >
                > [...]
                >
                > Maybe this was intended to be a silly number, but: this means very
                > little. The degree of slowdown is hugely variable from one domain to
                > the next, and from one program to the next, and I've never heard
                > anyone else quote an indicative figure anywhere near that high.
                >[/color]

                Right. The figure most often stated seems to be about 50, but as you
                say, there is so much variation that any number is nearly useless.

                Gary Herron



                Comment

                • JanC

                  #9
                  Re: RAD with Python

                  vivek@cs.unipun e.ernet.in schreef:
                  [color=blue]
                  > (Actually there is no seperate documentation for wxPython, it a wrapper
                  > around the wxWindows library)[/color]

                  There is a bit of wxPython documentation here:
                  <http://www.orbtech.com/www/wxPythonDocs.ht ml>

                  Looks like the start of a work-in-progress to me, and I think it comes with
                  the last wxPython release too.

                  --
                  JanC

                  "Be strict when sending and tolerant when receiving."
                  RFC 1958 - Architectural Principles of the Internet - section 3.9

                  Comment

                  • Steve Lamb

                    #10
                    Re: RAD with Python

                    On 2003-09-12, vivek@cs.unipun e.ernet.in <vivek@cs.unipu ne.ernet.in> wrote:[color=blue]
                    > If u are new to Python and have no previous experience with C++ then
                    > I think Tkinter is the best place to start. If you are comfortable
                    > with C++ then u can use wxPython. (Actually there is no seperate
                    > documentation for wxPython, it a wrapper around the wxWindows library)[/color]

                    Actually I had no prior experience with C++ (or C) and found
                    wxPython extremely easy to use. I don't see how C++ is needed to read
                    the docs for wxWindows. You just ignore the datatypes and read the
                    notes on where the wxPython version differs from wxWindows. For example
                    wxTextCntl.Posi tionToXY(). In wxWindows it takes 3 arguments, the
                    position and two variables to return the x and y positions into.
                    Underneath it it clearly says the wxPython method returns a tuple
                    (x, y).

                    --
                    Steve C. Lamb | I'm your priest, I'm your shrink, I'm your
                    PGP Key: 8B6E99C5 | main connection to the switchboard of souls.
                    -------------------------------+---------------------------------------------

                    Comment

                    • Greg Brunet

                      #11
                      Re: RAD with Python

                      "Ubaidullah Nubar" <ubaidullahnuba r@hotmail.com> wrote in message
                      news:17d520f6.0 309120509.491e4 d7c@posting.goo gle.com...[color=blue]
                      > Hi,
                      >
                      > How well is Python suited for developing database based applications?
                      > I am new to Python so please bear with me if some of the questions are
                      > too simple. I specifically have the following questions:
                      >
                      > 1. Is there an example of a simple data-entry application written in
                      > Python using a GUI interface? Something like a simple address book app
                      > with a listbox displaying all addresses with the ability to
                      > add/modify/delete.
                      >
                      >.....[/color]

                      In addition to the other recommendations made, you might want to check
                      out PythonCard [http://pythoncard.sourceforge.net/]. It is based on
                      wxPython (like Boa Constructor preciously mentioned), which provides a
                      cross-platform GUI capability. There are a lot of samples a few of
                      which come close to what you've described (check dbBrowser &
                      dbBrowser2). There is another project: GNUe
                      [http://www.gnuenterprise.org/project/what.php], which plans to be a
                      full-blown ERP system at some point, but is creating database designer,
                      forms, reporting, etc. tools to support the overall package. These are
                      in some way like what you may be considering, but I don't think that
                      it's quite ready yet.

                      As far as something that is like Clarion - I don't think you'll find
                      anything that can easily duplicate what you can do with that tool. That
                      IS something that I would also really like to see, whether you're coming
                      from Clarion, MS Access, FileMaker, FoxPro, Alpha Software, or any of
                      those type of RAD, database type tools. While each of them have their
                      strengths and differences, they all are in the same general solution
                      space, and it seems that a Python based tool could work very well in
                      that space. It seems that the MojoView package may be the closest.
                      I've been thinking about what it would take to write this myself, but,
                      for the time being, the project is a bit more work than I can take on
                      right now. Good luck if you start pursuing it.


                      --
                      Greg

                      Comment

                      • David M. Cook

                        #12
                        Re: RAD with Python

                        In article <17d520f6.03091 20509.491e4d7c@ posting.google. com>, Ubaidullah
                        Nubar wrote:
                        [color=blue]
                        > 1. Is there an example of a simple data-entry application written in
                        > Python using a GUI interface? Something like a simple address book app
                        > with a listbox displaying all addresses with the ability to
                        > add/modify/delete.[/color]

                        You might want to take a look at



                        and

                        http://www.async.com.br/projects/kiwi/ (which can interface with ZODB)

                        There used to be an interesting project called Koala, but it seems to have
                        died.


                        [color=blue]
                        > 2. There seem to be a number of GUI frameworks available? Which one is
                        > good for use on Windows and Linux?[/color]

                        wxPython or good old Tkinter are probably the best bets currently, or PyQt
                        if the licensing is not an issue for you.

                        Dave Cook

                        Comment

                        • Ubaidullah Nubar

                          #13
                          Re: RAD with Python

                          Thanks to all those who replied.

                          I will appreciate some more clarification regarding the GUI framework.
                          From the wxPython web site, it looks very good but the two tools
                          mentioned here
                          for easing the development of GUI apps (mojoview and kiwi) are both
                          based on GTK.

                          Are they fundamentally different or just a matter of style.

                          How easy to switch from one framework to another?

                          Which framework supports internationaliz ation better? Do they support
                          Right-to-left layouts?

                          Is there any site that lists the differences/capabilities of each
                          framework?

                          Also, a comparison between Boa Constructor and Glade-2. I haven't seen
                          either so am not sure if they are even comparable.

                          Thanks & Regards,
                          Ubaidullah Nubar.


                          John <john.thingstad @chello.no> wrote in message news:<oprvd7fyp 7fhfgdd@news.ch ello.no>...[color=blue]
                          > On 12 Sep 2003 06:09:02 -0700, Ubaidullah Nubar
                          > <ubaidullahnuba r@hotmail.com> wrote:
                          >[color=green]
                          > > Hi,
                          > >
                          > > How well is Python suited for developing database based applications?
                          > > I am new to Python so please bear with me if some of the questions are
                          > > too simple. I specifically have the following questions:
                          > >
                          > > 1. Is there an example of a simple data-entry application written in
                          > > Python using a GUI interface? Something like a simple address book app
                          > > with a listbox displaying all addresses with the ability to
                          > > add/modify/delete.
                          > >
                          > > 2. There seem to be a number of GUI frameworks available? Which one is
                          > > good for use on Windows and Linux?
                          > >
                          > > 3. Can Python apps be compiled to an exe? Can the resulting executable
                          > > be distributed commercially?
                          > >
                          > > 4. What types of applications are not suitable to be written in
                          > > Python?
                          > >
                          > > I have good knowledge of many languages including C++, Assembler,
                          > > Java, etc. My preferred development tool is Clarion currently. If
                          > > anybody with a Clarion background can share their experience with
                          > > Python, that will be very helpful.
                          > >
                          > > Appreciate your answers...
                          > >
                          > > Thanks & Regards,
                          > > Ubaidullah Nubar.
                          > >[/color]
                          >
                          > My choice would be wxPython. Look at the wxPython demo form plenty of
                          > source.
                          >
                          > 2.
                          > My personal preference of a Python RAD is Boa Constructor.
                          > You will need to install wxWindows (www.wxWindows.org) wxPython
                          > (www.wxPython.org)
                          > and finally the Boa Constructor itself (boa-constructor.sou rceforge.net).
                          > The resulting code is portable to unix and maybe mac.
                          >
                          > 3.
                          > py2exe is used to generate executable python programs under windows.
                          > The resulting code can be freely distrinuted.
                          >
                          > 4.
                          > Python is appox 400 times slower than C.
                          > If you are doing complex algorithmics on large data sets and a module like
                          > numpy dosn't accelerate what you need you might be better off with another
                          > language.
                          > (Note that for most application the time is spendt in C modules interfaced
                          > by python.)
                          > You have to options:
                          > 1. Implement the critical sections in C (the SWIG interface genetrator
                          > helps grind the C interface to pyhton)
                          > 2. Use another language (My choice.. I use Common Lisp for complex
                          > algorithmics)[/color]

                          Comment

                          • Ubaidullah Nubar

                            #14
                            Re: RAD with Python

                            Gary Herron <gherron@island training.com> wrote in message news:<mailman.1 063381340.26766 .python-list@python.org >...[color=blue]
                            > On Friday 12 September 2003 08:17 am, John wrote:[color=green]
                            > > On 12 Sep 2003 06:09:02 -0700, Ubaidullah Nubar
                            > >
                            > > <ubaidullahnuba r@hotmail.com> wrote:[color=darkred]
                            > > > Hi,
                            > > >
                            > > > How well is Python suited for developing database based applications?
                            > > > I am new to Python so please bear with me if some of the questions are
                            > > > too simple. I specifically have the following questions:
                            > > >
                            > > > 1. Is there an example of a simple data-entry application written in
                            > > > Python using a GUI interface? Something like a simple address book app
                            > > > with a listbox displaying all addresses with the ability to
                            > > > add/modify/delete.
                            > > >
                            > > > 2. There seem to be a number of GUI frameworks available? Which one is
                            > > > good for use on Windows and Linux?[/color][/color]
                            >
                            > I've used Tkinter for cross platform development with great success
                            > for years, but recently I've been playing with pyGTK (and the
                            > libraries it is built upon: GTK+, glade-2 and libglade), and
                            > I like the results very much.
                            >
                            > PyGTK works on both window and Linux/Unix, Comparing the two, it seems
                            > that PyGTK produces GUI's which look much better, and are *much* more
                            > responsive. And the GUI building tool, glade-2, is *very* easy and
                            > convenient to work with.[/color]

                            Don't they all (PyGTK, wxPython, etc.) use the underlying GUIs (e.g.
                            Windows API/KDE/Gnome, etc.)? So where does the better looking part
                            come from? Or do some of them recreate the whole GUI layer?

                            Reading some other threads on this ng, there are posts that mention
                            that gtk has issues running under Win32. Are these concerns still
                            valid or have they been resolved with the latest version?

                            Comment

                            • John J. Lee

                              #15
                              Re: RAD with Python

                              ubaidullahnubar @hotmail.com (Ubaidullah Nubar) writes:
                              [color=blue]
                              > Gary Herron <gherron@island training.com> wrote in message[/color]
                              news:<mailman.1 063381340.26766 .python-list@python.org >...
                              [...comparing Tk and GTk...][color=blue][color=green]
                              > > PyGTK works on both window and Linux/Unix, Comparing the two, it seems
                              > > that PyGTK produces GUI's which look much better, and are *much* more
                              > > responsive. And the GUI building tool, glade-2, is *very* easy and
                              > > convenient to work with.[/color]
                              >
                              > Don't they all (PyGTK, wxPython, etc.) use the underlying GUIs (e.g.
                              > Windows API/KDE/Gnome, etc.)? So where does the better looking part
                              > come from? Or do some of them recreate the whole GUI layer?[/color]

                              They all look good except Tkinter <0.5 wink>. Tkinter builds up some
                              of its widgets (eg. tree views, IIRC) from simpler native widgets, so
                              they don't look on Windows as nice as native tree views. At least,
                              that used to be the case.

                              In fact that's unfair on Tkinter, since AFAIK no toolkit works well
                              with both KDE and GNOME. Yes, they both (usually) use X windows, X
                              never *had* a 'look and feel' in the first place. KDE and GNOME each
                              define a lot about the way things look and the way things work, so KDE
                              apps look bad in GNOME, and vice versa. The consensus is that nobody
                              can be bothered to put in the work to fix this.

                              I don't know why GTk sometimes looks bad on Windows. Of course, in
                              one sense the reason is simply that it didn't start out there, but I
                              don't know what the particulars are.

                              [color=blue]
                              > Reading some other threads on this ng, there are posts that mention
                              > that gtk has issues running under Win32. Are these concerns still
                              > valid or have they been resolved with the latest version?[/color]

                              You can certainly get good-looking Windows GUIs out of GTk
                              (eg. http://www.workrave.org/), but people complain that it's hard to
                              do (in fact, people frequently complain that GTk is in general
                              difficult to work with when compared with the other popular toolkits
                              -- partly due to the lack of documentation).

                              I've never seen anybody give a convincing reason why GTk is a good
                              choice for *anything* except writing GNOME apps.


                              John

                              Comment

                              Working...