Path: csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.080 X-Spam-Evidence: '*H*': 0.84; '*S*': 0.00; 'python': 0.07; 'this:': 0.11; 'lambda': 0.16; 'skip:\xc2 30': 0.16; 'subject:Glade': 0.16; 'subject:PyGTK': 0.16; 'subject:wrong': 0.16; 'thanks,': 0.17; 'header:In-Reply-To:1': 0.22; 'works.': 0.23; 'skip:# 10': 0.25; 'url:mailman': 0.27; 'message-id:@mail.gmail.com': 0.28; 'thanks': 0.29; 'subject:?': 0.29; 'class': 0.29; 'list': 0.30; 'skip:\xc2 20': 0.31; 'wishes,': 0.31; 'import': 0.32; 'to:addr:python-list': 0.32; 'url:listinfo': 0.33; 'file': 0.35; 'subject:What': 0.35; 'subject:/': 0.36; 'received:209.85': 0.37; '8bit%:12': 0.38; 'received:google.com': 0.38; '8bit%:6': 0.39; 'url:au': 0.39; 'skip:s 30': 0.39; 'to:addr:python.org': 0.39; 'received:209': 0.39; '8bit%:8': 0.39; 'header:Received:5': 0.40; 'best': 0.60; 'world': 0.65; 'subject:. ': 0.66; 'regards.': 0.77; 'skip:\xc2 10': 0.83; 'received:209.85.210.174': 0.84; 'received:mail- iy0-f174.google.com': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type:content-transfer-encoding; bh=vRuD1t/O0ykj7yMokWNGKXMpCbrnULVVdP7Q18qIUeQ=; b=G+CwpQ3n2UITEniiPIk6gefn9dMgdb3MXo348KdOmE97hJ7VzPEPB2ljDZd9v0jBWP yEe9Ip4m1qQ0u6PITGEuKXY14JEHiPaJ4nlZDmD6Wm5i85Vn6KkJsSD1VFQMNqhI/4e3 9Z966UcInspSFwBvZ+xXosAymsuwzVQT/Kp+k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Hp0ACAiHeoz7B/iWHtNl7kdkasY/ona6MUslxfslYC/SihJHkMIfMo+YdP+lHTL49U 2nil2zi0w9EoQdj8Kblmp8a6hq87+l+6Q4Ki/TL5itLHyCcbw+WEVN5S6+NHOka1V9gh YyQBGS+2g9k5d8rW0eCHFnF1PkZWpv2W4OS2g= MIME-Version: 1.0 In-Reply-To: References: <1304740062.2510.2.camel@cristian-desktop> Date: Sat, 7 May 2011 15:14:07 +1100 Subject: Re: PyGTK, Glade/libglade. What am I doing wrong? From: =?UTF-8?B?0JTQsNC90LjQuNC7INCg0YvQttC60L7Qsg==?= To: python-list@python.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 40 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1304741651 news.xs4all.nl 32470 [::ffff:82.94.164.166]:51052 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:4886 Thanks, Cristian! It works. > List of Pygtk: http://www.daa.com.au/mailman/listinfo/pygtk Thanks again. Subscribed :) 2011/5/7 craf : > Hi. > > Try this: > > #!/usr/bin/env python > > import gtk.glade > > class TestPyGtk: > =C2=A0 =C2=A0"""This is an Hello World GTK application""" > > =C2=A0 =C2=A0def __init__(self): > > =C2=A0 =C2=A0 =C2=A0 =C2=A0#Set the Glade file > =C2=A0 =C2=A0 =C2=A0 =C2=A0self.gladefile =3D "test.glade" > =C2=A0 =C2=A0 =C2=A0 =C2=A0self.glade =3D gtk.glade.XML(self.gladefile) > > =C2=A0 =C2=A0 =C2=A0 =C2=A0self.MainWindow =3D self.glade.get_widget('Mai= nWindow') > =C2=A0 =C2=A0 =C2=A0 =C2=A0self.MainWindow.show() > =C2=A0 =C2=A0 =C2=A0 =C2=A0self.MainWindow.connect('destroy', lambda e:gt= k.main_quit()) > > > > TestPyGtk() > gtk.main() > > Regards. > > Cristian. > > List of Pygtk: http://www.daa.com.au/mailman/listinfo/pygtk -- Best wishes, Daniil