Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.009 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:Python': 0.06; '(b)': 0.07; 'apps,': 0.07; 'toolkit': 0.09; '\xe2\x80\x94': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'gui': 0.12; "wouldn't": 0.14; '"from': 0.16; 'bindings,': 0.16; 'builder.': 0.16; 'effect,': 0.16; 'etc...': 0.16; 'get,': 0.16; 'ignoring': 0.16; 'interesting:': 0.16; 'labelled': 0.16; 'proficiency': 0.16; 'proportion': 0.16; 'subject:Glade': 0.16; 'apps': 0.16; 'so.': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'app': 0.19; 'trying': 0.19; 'commit': 0.19; 'examples': 0.20; 'seems': 0.21; 'import': 0.22; 'cc:addr:python.org': 0.22; '(a)': 0.24; 'frameworks': 0.24; 'now?': 0.24; 'decide': 0.24; 'versions': 0.24; "haven't": 0.24; 'question': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '>': 0.26; 'least': 0.26; 'developing': 0.27; 'header:In-Reply- To:1': 0.27; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; '(although': 0.31; 'libraries': 0.31; 'purely': 0.31; 'use?': 0.31; 'yes.': 0.31; 'everyone': 0.33; 'comment': 0.34; "i'd": 0.34; 'etc.)': 0.35; 'one,': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'there': 0.35; 'in.': 0.36; 'doing': 0.36; 'subject:?': 0.36; 'similar': 0.36; 'should': 0.36; 'half': 0.37; 'searching': 0.37; 'list': 0.37; 'starting': 0.37; 'skip:& 10': 0.38; 'jason': 0.38; 'track': 0.38; 'little': 0.38; 'anything': 0.39; 'recent': 0.39; 'mailing': 0.39; 'either': 0.39; 'even': 0.60; 'dave': 0.60; 'eventually': 0.60; 'is.': 0.60; 'most': 0.60; 'tell': 0.60; 'march': 0.61; "you've": 0.63; 'address': 0.63; 'developed': 0.63; 'decided': 0.64; 'more': 0.64; 'here': 0.66; 'between': 0.67; 'url:a': 0.72; 'other.': 0.75; '100%': 0.77; 'yourself': 0.78; '2015': 0.84; 'good,': 0.91; 'subject:+': 0.91; 'loves': 0.93; 'luck': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=U7lgLSnwZ7XpgkRiRBGMPYNlODmH3WWS79s2NIVoFTE=; b=A1c/Wm87wPCnIcEq4T2/HX+IZMv8aRYfql4bt5C9KXCjjrg4amQJv15g4r1ERoqrFa TgDX+XDODHwvb2N8gRCghWjNcJoFVEnYAYNU/EEpTZUqhxKzkkgWHH+vFPHd2ZPp/PFG Y9Dhvsj0L13s+ZwXeePfErS6ui9s38mcqF0nMs8VTlmL/wPAYzWm5WDa5yRhiu35lAMz yvLWs4uKH5aBL+q9wI1VO3rrUC2vFEO8jC6Yfxx8rqDdJjRHSLroZA/baQ1y9jvOjR3v x5gYqkomVLS/FgsHIokBSmRd1AhdMJwPl+TuKHa23si2bZQjhJ3cP68p3Gr9VGIqHfcH Xb4g== MIME-Version: 1.0 X-Received: by 10.107.163.65 with SMTP id m62mr81096808ioe.40.1426569751844; Mon, 16 Mar 2015 22:22:31 -0700 (PDT) In-Reply-To: References: Date: Tue, 17 Mar 2015 16:22:31 +1100 Subject: Re: Python+Glade+Gtk tutorial? From: Jason Heeris To: Dave Farrance Cc: python-list@python.org Content-Type: multipart/alternative; boundary=001a1140fc4c4e7bfb05117527f6 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.19 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 99 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1426569754 news.xs4all.nl 2899 [2001:888:2000:d::a6]:35329 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:87622 --001a1140fc4c4e7bfb05117527f6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Warning: I'm only going to answer half of your questions :) I haven't built any GTK2/3 app in a while, but hopefully others here can address your other questions (although you might have better luck on the Python/GTK mailing list when it comes to finding a good tutorial, etc.) On 17 March 2015 at 03:13, Dave Farrance < DaveFarrance@omitthisyahooandthis.co.uk> wrote: > A web-search told me that Glade seems to be most peoples choice (over > QT-Designer) for a GUI builder. So even though I use a KDE desktop > (Kubuntu 14.10), I decided to try Glade. In terms of toolkit bindings, (a) I prefer GTK, but (b) it's impossible to tell what the greater proportion of people using one vs. the other is. Or if they're wise to do so. Are there more Google hits/SO questions because it's harder to use? Or because everyone loves to use it? (And so on...) A recent comment on my SO answer to a similar question claims PyQT/PySide is a good way to go, with a couple of links there you might find interesting: http://stackoverflow.com/a/3290724/188535 I wouldn't stress over it though; you can give yourself a headache trying to decide between frameworks you've never developed in. Try one, commit to developing at least some proficiency in it, and then try the other. > "from gi.repository import Gtk, Gdk, GObject, Pango" etc... > > ... I get, in effect, the libraries used in Gnome-3 even with python2? Yes. The GTK and Python versions are independent. You can make GTK3 apps with either Python 2 or 3. It's purely coincidence that Python 3 and GTK3 came out around the same time. Going the other way, Gnome 3 still includes some GTK2 apps, but I think you'd get little sympathy for starting a *new* app in GTK2 instead of 3. > Am I on the right track now? Glade is a good choice for GUI building? An= d > even though I'm using Python2, I should be ignoring all examples turned u= p > by searching for "PyGTK" because they all seem to be GTK+2 and obsolete? Glade is good, although eventually you learn the lesson that it's not going to give you 100% control over your UI =E2=80=94 there are some things you a= re better off doing in your app setup code. And yes, I'd recommend ignoring anything labelled PyGTK. =E2=80=94 Jason --001a1140fc4c4e7bfb05117527f6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Warning: I'm only going to answer half of your qu= estions :)

I haven't built any GTK2/3 app in a= while, but hopefully others here can address your other questions (althoug= h you might have better luck on the Python/GTK mailing list when it comes t= o finding a good tutorial, etc.)

On 17 March 2015 at 03= :13, Dave Farrance <DaveFarrance@omitthisyahooandthis.co.uk> wrote:
> A web= -search told me that Glade seems to be most peoples choice (over
> QT= -Designer) for a GUI builder.=C2=A0 So even though I use a KDE desktop
&= gt; (Kubuntu 14.10), I decided to try Glade.

In terms of= toolkit bindings, (a) I prefer GTK, but (b) it's impossible to tell wh= at the greater proportion of people using one vs. the other is. Or if they&= #39;re wise to do so. Are there more Google hits/SO questions because it= 9;s harder to use? Or because everyone loves to use it? (And so on...)

A recent comment on my SO answer to a similar question= claims PyQT/PySide is a good way to go, with a couple of links there you m= ight find interesting:=C2=A0http://stackoverflow.com/a/3290724/188535

I wouldn't stress over it though; you can give yourself a headache t= rying to decide between frameworks you've never developed in. Try one, = commit to developing at least some proficiency in it, and then try the othe= r.

> "from gi.repository import Gtk, Gdk, = GObject, Pango" etc...
>
> ... I get, in effect, the libra= ries used in Gnome-3 even with python2?

Yes. The G= TK and Python versions are independent. You can make GTK3 apps with either = Python 2 or 3. It's purely coincidence that Python 3 and GTK3 came out = around the same time.

Going the other way, Gnome 3= still includes some GTK2 apps, but I think you'd get little sympathy f= or starting a *new* app in GTK2 instead of 3.

> Am I on th= e right track now?=C2=A0 Glade is a good choice for GUI building? And
&g= t; even though I'm using Python2, I should be ignoring all examples tur= ned up
> by searching for "PyGTK" because they all seem to = be GTK+2 and obsolete?

Glade is good, although eve= ntually you learn the lesson that it's not going to give you 100% contr= ol over your UI =E2=80=94 there are some things you are better off doing in= your app setup code.

And yes, I'd recomme= nd ignoring anything labelled PyGTK.

=E2=80=94 Jas= on

--001a1140fc4c4e7bfb05117527f6--