如何开始GUI编程? [英] How to get started in GUI Programming?

查看:63
本文介绍了如何开始GUI编程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试用Python学习GUI编程,但是必须承认我

我觉得很难。


我不是一个经验丰富的程序员 - 只是有人从时间到b $ b $时间写小程序供我使用。多年来,我已经从GWBASIC向QBASIC转移到了Visual Basic,现在尝试将

移到Linux平台上。 Python似乎是命令行基本编程的局限性和C语言总难以理解之间的最佳折衷。


谷歌搜索它似乎最好的图形用户界面是Tkinter或PyGtk。我b $ b找到了一本推荐PyGtk的书,因为它有一个图形设计

选项,Glade。来自VB背景我锁定了它并且

买了这本书(Beginning Python,Wrox),但令人失望

(或者更确切地说是完全浪费钱) ) - 文中没有详细说明




我在PyGtk网站上找到了教程和参考手册,

虽然我已经取得了一些进展,但我一直在达到积分,我没有足够的背景来理解它们。目前我在对话框上卡住了

(代码似乎非常复杂,相当于

MsgBox(你真的想这么做,vbYesNo )并且我还没有b $ b让它正常工作并将图形图像加载到除原始尺寸之外的任何物品中,但是每一个新步骤都会带来另一个/>
奋斗


我看过Tkinter书的参考 - 比如''Python

和Tkinter Programming''但是它好像已经绝版了,而且
不可用。


有人能提出任何关于最不痛苦的前进方式的建议吗?


(电子邮件地址有效,但很久以来就被放弃了

垃圾邮件。请依靠新闻组)

解决方案

pe**********@talk21.com 启发我们:

用Google搜索它似乎是最好的GUI是Tkinter或PyGtk。




我会选择wxPython ;-)


Sybren
-

世界的问题是愚蠢。并不是说应该对愚蠢的死刑进行处罚,但为什么我们不要仅仅拿掉

安全标签来解决问题呢? br />
Frank Zappa


周五,2005年11月25日06:02:40 -0800 schrieb peter.mosley:

我正在尝试用Python学习GUI编程,但不得不承认我很难找到它。


是的,如果你来自Visual Basic,你可能会遗漏一些东西。

我前段时间用Visual Basic开发过,就像它的某些部分一样。


我已经在PyGtk网站上找到了教程和参考手册,
但是虽然我已经取得了一些进展,但我一直在达到我的目标。 >没有足够的背景来理解它们。目前我已经卡在对话框上了(代码看起来非常复杂,相当于
MsgBox(你真的想这么做,vbYesNo)


在此处搜索yesNoDialog:
http: //guettli.sourceforge.net/gthum...ditMetadata.py

我还没有让它正常工作)并在任何东西中加载图形图像
除了原来的尺寸,但是每一个新的步骤都会带来另一个好处...... b $ b

在链接中搜索scale2pixbuf。

任何人都可以对于最不痛苦的前进方式提出任何建议?




只有开始是痛苦的。过了一段时间,你不会再错过任何来自Visual Basic的
了。


快乐学习,

Thomas

-

ThomasGüttler, http:/ /www.thomas-guettler.de/

电子邮箱:guettli(*)thomas-guettler + de

垃圾邮件捕手: NI ************** @ thomas-guettler.de


2005年11月25日,Sybren Stuvel< sy ******* @ yourthirdtower.com.imagination>
< blockquote class =post_quotes>我会选择wxPython; - )




我会选择Dabo,这是围绕wxPython的Pythonic包装器。他们甚至可以使用视觉设计工具来布局你的UI,就像你在Visual Basic中使用
一样。


-


#pd


I am trying to learn GUI programming in Python, but have to confess I
am finding it difficult.

I am not an experienced programmer - just someone who from time to
time writes small programs for my use. Over the years I have moved
from GWBASIC to QBASIC to Visual Basic, and now trying to move across
to a Linux platform. Python seems to be the best compromise between
the limitations of command line basic programming and the total
incomprehensibility of C.

Googling around it seems the best GUI is either Tkinter or PyGtk. I
found a book which recommended PyGtk, as it had a graphical design
option, Glade. Coming from a VB background I latched onto that and
bought the book (Beginning Python, Wrox), but it was a disappointment
(or more accurately a complete waste of money) - there was
insufficient detail in the text.

I''ve found the tutorial and reference manual on the PyGtk web site,
but although I''ve made some progress, I keep reaching points where I
have insufficient background to understand them. Currently I''m stuck
on dialog boxes (the code seems immensely complex for the equivalent of
MsgBox("Do you really want to do this ",vbYesNo) and I haven''t
got it to work properly yet) and loading graphical images in anything
other than their original size, but every new step brings another
struggle

I''ve seen reference to a Tkinter book - something like ''Python
and Tkinter Programming'' but it seems to be out of print and
unavailable.

Can anyone offer any suggestions as to the least painful way forwards?

(Email address was valid once but has long since been abandoned to
spam. Please rely via newsgroup)

解决方案

pe**********@talk21.com enlightened us with:

Googling around it seems the best GUI is either Tkinter or PyGtk.



I''d go for wxPython ;-)

Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don''t we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa


Am Fri, 25 Nov 2005 06:02:40 -0800 schrieb peter.mosley:

I am trying to learn GUI programming in Python, but have to confess I
am finding it difficult.
Yes, if you come from Visual Basic you might be missing something.
I developed with Visual Basic some time ago and like some parts of it.

I''ve found the tutorial and reference manual on the PyGtk web site,
but although I''ve made some progress, I keep reaching points where I
have insufficient background to understand them. Currently I''m stuck
on dialog boxes (the code seems immensely complex for the equivalent of
MsgBox("Do you really want to do this ",vbYesNo)
search for yesNoDialog here:
http://guettli.sourceforge.net/gthum...ditMetadata.py
and I haven''t
got it to work properly yet) and loading graphical images in anything
other than their original size, but every new step brings another
struggle
search for scale2pixbuf in the link.
Can anyone offer any suggestions as to the least painful way forwards?



Only the beginning is painful. After some time you don''t miss anything
from Visual Basic anymore.

Happy Learning,
Thomas
--
Thomas Güttler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de
Spam Catcher: ni**************@thomas-guettler.de


On 11/25/05, Sybren Stuvel <sy*******@yourthirdtower.com.imagination>

I''d go for wxPython ;-)



I''d go for Dabo, which is a Pythonic wrapper around wxPython. They are
even working on a visual design tool to lay out your UI, much as you
would in Visual Basic.

--

# p.d.


这篇关于如何开始GUI编程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆