Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #4885
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <pyclutter@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.007 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'displayed': 0.03; 'python': 0.07; 'pm,': 0.11; 'this:': 0.11; 'def': 0.13; 'wrote:': 0.14; '"""this': 0.16; 'control-c': 0.16; 'executed,': 0.16; 'lambda': 0.16; 'received:192.168.2.2': 0.16; 'subject:Glade': 0.16; 'subject:PyGTK': 0.16; 'subject:wrong': 0.16; 'url:pastebin': 0.16; 'x-mailer:evolution 2.28.1': 0.16; '(most': 0.16; 'cc:2**0': 0.20; 'header:In-Reply-To:1': 0.22; 'cc:addr :python-list': 0.22; 'trying': 0.23; "haven't": 0.23; 'last):': 0.23; 'received:209.85.214.174': 0.23; 'received:mail- iw0-f174.google.com': 0.23; 'works.': 0.23; 'wrong?': 0.23; 'wrote': 0.25; 'skip:# 10': 0.25; "wasn't": 0.25; 'script': 0.26; "i'm": 0.26; 'url:mailman': 0.27; 'tried': 0.27; 'subject:?': 0.29; 'received:192.168.2': 0.29; 'class': 0.29; 'list': 0.30; 'cc:addr:python.org': 0.31; '---': 0.31; 'normal.': 0.31; 'wishes,': 0.31; 'it.': 0.31; 'import': 0.32; 'url:listinfo': 0.33; 'sorry': 0.33; 'test': 0.33; 'received:192': 0.34; 'skip:" 10': 0.34; 'actually': 0.34; 'there': 0.35; 'file': 0.35; 'subject:What': 0.35; 'doing': 0.36; 'subject:/': 0.36; 'received:192.168': 0.37; 'received:209.85': 0.37; 'url:python': 0.37; 'run': 0.37; 'received:google.com': 0.38; 'but': 0.38; 'url:org': 0.38; 'used': 0.38; 'anything': 0.38; 'help': 0.39; 'received:209.85.214': 0.39; 'url:au': 0.39; 'skip:s 30': 0.39; 'could': 0.39; 'received:209': 0.39; 'header:Mime-Version:1': 0.39; 'how': 0.39; 'header:Received:5': 0.40; 'learn': 0.60; 'best': 0.60; '2011': 0.62; 'world': 0.65; 'subject:. ': 0.66; 'show': 0.67; 'regards.': 0.77; 'russian': 0.77; 'displayed.': 0.84; 'need,': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:cc:in-reply-to:references :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=lmG7Djwy5DrnBBkvX2V8aXIsJMhW6pdiz3HKcguARTI=; b=ocVx9dxFDfzk18OtxHyODu/TYoaa2AHeQLm9wZPuOBVbu2Vu9AAsjxLcfaodSklMVd oS/U7e5DbO5K5j0g1qYWSdeTMYGVFwiwPJhkonC3j/+q+nV3WTa1DBVswmepYladAHwa FwGgPE4AzW7kUwyJnBpEB12JssTssLTstzo8c= |
| DomainKey-Signature | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=qLUkgnWDPQwrxVnmwdGCCk+XLJl9h7rLXBkpdkUSLm2NHFTnCvSvmsoAygL2q+C4Lb e95/oxpGUvKs02/bEqkmYHJqjxlpL78hc3t+4+J3YLszDeg627aYNH/gmv3C+lhFL1mK Rpq5WR1MlPrnhn8ejYWHPlbngQ6g28sYvy/A8= |
| Subject | Re: PyGTK, Glade/libglade. What am I doing wrong? |
| From | craf <pyclutter@gmail.com> |
| To | Benjamin Kaplan <benjamin.kaplan@case.edu> |
| In-Reply-To | <BANLkTikwb6E_51YsukD5seH0y2xR2YG9jg@mail.gmail.com> |
| References | <BANLkTiksuTENPuU-Jyj8YJnOkdjSO=gzQA@mail.gmail.com> <BANLkTikwb6E_51YsukD5seH0y2xR2YG9jg@mail.gmail.com> |
| Content-Type | text/plain; charset="UTF-8" |
| Date | Sat, 07 May 2011 00:47:42 -0300 |
| Mime-Version | 1.0 |
| X-Mailer | Evolution 2.28.1 |
| Content-Transfer-Encoding | 8bit |
| Cc | "python-list@python.org" <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1283.1304740071.9059.python-list@python.org> (permalink) |
| Lines | 65 |
| NNTP-Posting-Host | 82.94.164.166 |
| X-Trace | 1304740071 news.xs4all.nl 41102 [::ffff:82.94.164.166]:42092 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:4885 |
Show key headers only | View raw
On May 6, 2011 7:05 PM, "Даниил Рыжков" <daniil.re@gmail.com> wrote:
>
> Sorry for my English (I could not find help in the Russian community)
> I'm trying to learn PyGTK and Glade. I made test window in Glade and
> saved it as "test.glade" (attached). Then I wrote script
> "test.py"(attached, http://pastebin.com/waKytam3). I tried to run it.
> While the script was executed, console did not show anything and
> window wasn't displayed. When I pressed CTRL+С console displayed
> trackback:
> ---
> CTraceback (most recent call last):
> File "test.py", line 32, in <module>
> gtk.main()
> KeyboardInterrupt
> ---
> So what am I doing wrong?
>
>I haven't used gtk before, but is there a show method or something
>similar you need, to actually make the window appear? The
>KeyboardInterrupt is normal. That's how control-c works.
> --
> Best wishes,
> Daniil
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Hi.
Try this:
#!/usr/bin/env python
import gtk.glade
class TestPyGtk:
"""This is an Hello World GTK application"""
def __init__(self):
#Set the Glade file
self.gladefile = "test.glade"
self.glade = gtk.glade.XML(self.gladefile)
self.MainWindow = self.glade.get_widget('MainWindow')
self.MainWindow.show()
self.MainWindow.connect('destroy', lambda e:gtk.main_quit())
TestPyGtk()
gtk.main()
Regards.
Cristian.
List of Pygtk: http://www.daa.com.au/mailman/listinfo/pygtk
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: PyGTK, Glade/libglade. What am I doing wrong? craf <pyclutter@gmail.com> - 2011-05-07 00:47 -0300
csiph-web