Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #54400

Re: Python GUI?

Date 2013-09-18 14:10 -0600
From Michael Torrie <torriem@gmail.com>
Subject Re: Python GUI?
References (1 earlier) <mailman.297.1378962331.5461.python-list@python.org> <c2b4b1f4-6942-42c8-9675-2c74345d92d7@googlegroups.com> <mailman.318.1379004713.5461.python-list@python.org> <63de767b-1df3-4981-b86e-dbf8fa10c9e0@googlegroups.com> <CAMuTYXjFd6M25FPXaHsE=WE9xcy4kiOTxhxZ8OPzhsfkJQQTzw@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.135.1379535031.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 09/17/2013 10:19 AM, Benjamin Kaplan wrote:
> Sure. Every platform provides its own GUI library (Cocoa on Mac OS X,
> Win32 on Windows). Other programs that want to hook into yours, such
> as screen readers, are familiar with the platform's native GUI
> elements- it knows what a Win32 combo box is, and it knows how to read
> the text inside it.
> 
> The other way to make a GUI is to take a blank canvas and draw on it
> yourself. This is more flexible and provides a more consistent
> experience across platforms, but unless you specifically go out of
> your way to provide hooks for other programs to jump in, all they see
> is a bunch of pixels on the screen. In addition, drawing your own
> stuff won't necessarily give you the "normal for the operating system"
> behavior on other things, like tab behavior. It's possible for
> non-native GUI environments to mimic this behavior (and QT does a
> pretty good job of this), but there's always going to be little things
> that seem a bit off.
> 
> The situation is a bit more complicated because QT is the native
> toolkit on KDE, so in that environment, QT will be more "correct" than
> wx, which would be using GTK if present and plain X11 if it isn't.

I don't think the distinction you're drawing is really all that
important.  Almost all platforms now have accessibility APIs which are a
way better way to go than relying than trying to scrape the information
by peaking into GUI structures that could change.

And on Windows, while the Win32 widget stuff you speak of is a lowest
common denominator, few modern apps use it directly anymore.  MS Office
set the the example early on by creating a new widget set for every
release (using the blank canvas method you describe!).  .Net apps using
winforms use yet another widget set.  They all now use the theming API
to draw their widgets (just like Qt does on Windows), but do their own
even processing, etc.

And it turns out that wxWidget's use of the old win32 widgets means that
some widgets just look plain old and out of place on a new Windows 7 or
8 machine, though MS has tried to make the older widgets work better
with the new theming api:

http://wiki.wxwidgets.org/WxFAQ#Why_does_my_app_take_a_Windows-95-like_look_on_Windows_.3F

My point is, the former method isn't actually the best way to go in the
long run.  The second turns out to work out better, once things like
accessibility frameworks and theming apis are in place.  Perhaps in the
future MS Windows will just provide a drawing method and a theming api.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python GUI? eamonnrea@gmail.com - 2013-09-11 13:55 -0700
  Re: Python GUI? Michael Torrie <torriem@gmail.com> - 2013-09-11 23:05 -0600
    Re: Python GUI? eamonnrea@gmail.com - 2013-09-12 09:03 -0700
      Re: Python GUI? Robert Kern <robert.kern@gmail.com> - 2013-09-12 17:23 +0100
        Re: Python GUI? Dave Cook <davecook@nowhere.net> - 2013-09-12 18:50 +0000
          Re: Python GUI? Dave Cook <davecook@nowhere.net> - 2013-09-12 21:36 +0000
      Re: Python GUI? Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-09-12 09:51 -0700
        Re: Python GUI? rusi <rustompmody@gmail.com> - 2013-09-17 07:55 -0700
          Re: Python GUI? Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-09-17 09:19 -0700
            Re: Python GUI? rusi <rustompmody@gmail.com> - 2013-09-17 09:51 -0700
              Re: Python GUI? Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-09-17 10:57 -0700
          Re: Python GUI? Michael Torrie <torriem@gmail.com> - 2013-09-18 14:10 -0600
      Re: Python GUI? Michael Torrie <torriem@gmail.com> - 2013-09-12 21:02 -0600
        Re: Python GUI? eamonnrea@gmail.com - 2013-09-13 11:23 -0700
          Re: Python GUI? Michael Torrie <torriem@gmail.com> - 2013-09-13 22:03 -0600
            Re: Python GUI? Wolfgang Keller <feliphil@gmx.net> - 2013-09-14 19:15 +0200
              Re: Python GUI? Dave Cook <davecook@nowhere.net> - 2013-09-15 22:13 +0000
      Re: Python GUI? Michael Torrie <torriem@gmail.com> - 2013-09-12 21:18 -0600
    Re: Python GUI? Dave Cook <davecook@nowhere.net> - 2013-09-12 18:35 +0000
  Re: Python GUI? Jerry Hill <malaclypse2@gmail.com> - 2013-09-12 13:09 -0400
  Re: Python GUI? Ian Foote <ian@feete.org> - 2013-09-12 21:17 +0100
  Re: Python GUI? Peter <peter.milliken@gmail.com> - 2013-09-12 20:39 -0700
    Re: Python GUI? Michael Torrie <torriem@gmail.com> - 2013-09-12 22:15 -0600
  Re: Python GUI? CM <cmpython@gmail.com> - 2013-09-12 22:14 -0700
  Re: Python GUI? Kevin Walzer <kw@codebykevin.com> - 2013-09-13 09:27 -0400
    Re: Python GUI? Terry Reedy <tjreedy@udel.edu> - 2013-09-13 15:47 -0400
  Re: Python GUI? eamonnrea@gmail.com - 2013-09-13 10:31 -0700
    Re: Python GUI? John Gordon <gordon@panix.com> - 2013-09-13 18:39 +0000
      Re: Python GUI? Joe Junior <joe.fbs.junior@gmail.com> - 2013-09-13 15:49 -0300
        Re: Python GUI? eamonnrea@gmail.com - 2013-09-13 12:37 -0700
          Re: Python GUI? Joe Junior <joe.fbs.junior@gmail.com> - 2013-09-13 16:50 -0300
            Re: Python GUI? eamonnrea@gmail.com - 2013-09-13 13:40 -0700
          Re: Python GUI? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-09-14 00:21 +0000
            Re: Python GUI? eamonnrea@gmail.com - 2013-09-13 17:38 -0700
              Re: Python GUI? Ben Finney <ben+python@benfinney.id.au> - 2013-09-14 11:23 +1000
                Re: Python GUI? eamonnrea@gmail.com - 2013-09-14 04:54 -0700
                Re: Python GUI? Chris Angelico <rosuav@gmail.com> - 2013-09-14 22:07 +1000
          Re: Python GUI? Dave Angel <davea@davea.name> - 2013-09-14 02:05 +0000
        Re: Python GUI? Neil Cerutti <neilc@norwich.edu> - 2013-09-13 19:56 +0000
          Re: Python GUI? eamonnrea@gmail.com - 2013-09-13 13:40 -0700
    Re: Python GUI? llanitedave <llanitedave@veawb.coop> - 2013-09-18 19:47 -0700
  Re: Python GUI? petmertens@gmail.com - 2013-09-13 10:51 -0700
  Re: Python GUI? Metallicow <metaliobovinus@gmail.com> - 2013-09-20 11:34 -0700
    Re: Python GUI? Michael Torrie <torriem@gmail.com> - 2013-09-20 13:49 -0600
      Re: Python GUI? Metallicow <metaliobovinus@gmail.com> - 2013-09-20 12:58 -0700
        Re: Python GUI? Michael Torrie <torriem@gmail.com> - 2013-09-20 16:49 -0600
    Re: Python GUI? Robert Kern <robert.kern@gmail.com> - 2013-09-21 00:34 +0100

csiph-web