GUI tutorial

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John K Masters

    #1

    GUI tutorial

    Can someone point me in the direction of a good tutorial on programming
    python with a GUI? I'm just starting out with python and have written a
    few scripts successfully but would like to add a graphical front end to
    them to make it easier for my work colleagues, most of whom have never
    used a command line, to use.

    Regards, John
    --
    War is God's way of teaching Americans geography
    Ambrose Bierce (1842 - 1914)
  • Paul Rubin

    #2
    Re: GUI tutorial

    John K Masters <johnmasters@ox tedonline.netwr ites:
    Can someone point me in the direction of a good tutorial on programming
    python with a GUI? I'm just starting out with python and have written a
    few scripts successfully but would like to add a graphical front end to
    them to make it easier for my work colleagues, most of whom have never
    used a command line, to use.
    http://infohost.nmt.edu/tcc/help/pubs/tkinter/ is pretty good. You
    could alternatively consider writing your script as a web server or
    web app, so the gui would be a browser. That puts some limitations on
    the gui design but it makes development and deployment both simpler.
    Develoment is simpler because you just use regular HTML instead of
    weird libraries and callbacks and threads and all that crap.
    Deployment is simpler because you can install and run the program on
    one machine, send the url to your colleagues, and update the program
    as needed without having to get your colleagues constantly installing
    new versions. For security reasons, be careful to not expose the web
    interface to the public internet until you know what you're doing.

    Comment

    • vasudevram

      #3
      Re: GUI tutorial

      On May 13, 10:51 pm, John K Masters <johnmast...@ox tedonline.net>
      wrote:
      Can someone point me in the direction of a good tutorial on programming
      python with a GUI? I'm just starting out with python and have written a
      few scripts successfully but would like to add a graphical front end to
      them to make it easier for my work colleagues, most of whom have never
      used a command line, to use.
      >
      Regards, John
      --
      War is God's way of teaching Americans geography
      Ambrose Bierce (1842 - 1914)

      That depends on which GUI toolkit you want to use.

      There are at least one or two good online tutorials on the Web for
      Tkinter (the Python interface to the Tk toolkit).
      One is by Fredrik Lundh (a.k.a the effbot, a leading Python
      contributor). Google for suitable keywords, e.g. Tkinter tutorial.

      Tkinter comes with Python by default on Windows, so that helps. But
      wxPython is not a bad toolkit either.
      (You'll have to download and install it, also the demos (see below)
      are often a separate download.)
      I've used it some, and like it. I don't know of any tutorials for it,
      though there may be some - again, Google for info.
      But if you already have some GUI programming background, its not too
      difficult to pick up it up. It comes with a big set of demos with
      source code, and I was able to learn enough wxPython to write some
      simple apps just by looking at the demos source code and reading some
      of the reference documentation. Those apps are here:

      http://www.packtpub.com/article/Using_xtopdf

      Check the last part of the article for links to the source code.

      PyQt is another option, recommended by some people. Haven't tried it
      myself but have used Qt (the C++ GUI toolkit to which PyQt is a
      binding) a little, and like it a lot. Qt again is supposed to be of
      very high quality, according to some people. I am currently reading a
      book Programming Qt and found most of it pretty straightforward
      (though not simple :-) to understand (you do need to understand the
      concept of signals and slots, as that is fundamental to Qt
      programming).

      HTH
      Vasudev Ram
      Dancing Bison Enterprises
      Find information, resources and relevant links for dancingbison.com. This domain may be for sale.



      Comment

      • Ivan Voras

        #4
        Re: GUI tutorial

        John K Masters wrote:
        Can someone point me in the direction of a good tutorial on programming
        python with a GUI? I'm just starting out with python and have written a
        few scripts successfully but would like to add a graphical front end to
        them to make it easier for my work colleagues, most of whom have never
        used a command line, to use.
        If you're using Linux or some other unix-like platform, try PyGTK:



        (Yes, it can run on Windows, but it tends to be more complicated there).

        --
        (\__/)
        (O.o)
        (< )

        This is Bunny.
        Copy Bunny into your signature to help him on his way to world domination!


        -----BEGIN PGP SIGNATURE-----
        Version: GnuPG v1.4.4 (MingW32)
        Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

        iD8DBQFGR5Shldn AQVacBcgRAhGGAJ 9UEQwyHgMZc4S1K 3OSWd74uq6zaQCg xGx9
        5OXpBe8TyrWCCvJ yjQh6SdY=
        =A1Do
        -----END PGP SIGNATURE-----

        Comment

        • BartlebyScrivener

          #5
          Re: GUI tutorial

          On May 13, 12:51 pm, John K Masters <johnmast...@ox tedonline.net>
          wrote:
          Can someone point me in the direction of a good tutorial on programming
          python with a GUI?
          Alan Gauld added a gui programming tutorial to his main course.



          It's a frame page so I can't link directly, but select "GUI
          Programming" under Advanced Topics on the left.

          rd

          Comment

          • David Boddie

            #6
            Re: GUI tutorial

            On May 14, 2:57 am, BartlebyScriven er <bscrivene...@g mail.comwrote:
            On May 13, 12:51 pm, John K Masters <johnmast...@ox tedonline.net>
            wrote:
            >
            Can someone point me in the direction of a good tutorial on programming
            python with a GUI?
            >
            Alan Gauld added a gui programming tutorial to his main course.
            >

            >
            It's a frame page so I can't link directly, but select "GUI
            Programming" under Advanced Topics on the left.
            It may be worth pointing out that the information about licensing on
            that page
            is a little vague and inaccurate in places. PyGTK is actually licensed
            under
            the GNU LGPL, not the GPL, and both PyQt and PyGTK can be used to
            create
            commercial applications as long as those applications are not closed
            source.

            David

            Comment

            • Jarek Zgoda

              #7
              Re: GUI tutorial

              BartlebyScriven er napisa³(a):
              >Can someone point me in the direction of a good tutorial on programming
              >python with a GUI?
              >
              Alan Gauld added a gui programming tutorial to his main course.
              >

              >
              It's a frame page so I can't link directly, but select "GUI
              Programming" under Advanced Topics on the left.
              wxPython section of this tutorial seems bit outdated (the code resembles
              what was required in time of wxPython 2.4). Anyway, the explanation of
              event-driven approach is essential.

              --
              Jarek Zgoda

              "We read Knuth so you don't have to."

              Comment

              • Jarek Zgoda

                #8
                Re: GUI tutorial

                John K Masters napisa³(a):
                Can someone point me in the direction of a good tutorial on programming
                python with a GUI? I'm just starting out with python and have written a
                few scripts successfully but would like to add a graphical front end to
                them to make it easier for my work colleagues, most of whom have never
                used a command line, to use.
                Each of GUI frameworks/libraries has its own tutorial and some even more
                than one... The choice is directly related to what library you would use.

                --
                Jarek Zgoda

                "We read Knuth so you don't have to."

                Comment

                • John K Masters

                  #9
                  Re: GUI tutorial

                  On 15:03 Mon 14 May , Jarek Zgoda wrote:
                  John K Masters napisał(a):
                  >
                  Can someone point me in the direction of a good tutorial on programming
                  python with a GUI? I'm just starting out with python and have written a
                  few scripts successfully but would like to add a graphical front end to
                  them to make it easier for my work colleagues, most of whom have never
                  used a command line, to use.
                  >
                  Each of GUI frameworks/libraries has its own tutorial and some even more
                  than one... The choice is directly related to what library you would use.
                  Thanks to all for the advice. I shall start with Py-GTK and see how it
                  goes.

                  Regards, John
                  --
                  War is God's way of teaching Americans geography
                  Ambrose Bierce (1842 - 1914)

                  Comment

                  Working...