Python论坛  - 讨论区

标题:[python-chinese] ²ËÄñÎÊÌ⣺ÔõôÔÚlinuxÓÃpythonдGUI?

2004年08月26日 星期四 19:56

=?gb2312?q?=FFffffc6=FFffffc6=FFffffcb=FFffffe9=FFffffcf=FFffffb8=FFffffb?= =?gb2312?q?=FFffffc6=FFffffc6=FFffffcb=FFffffe9=FFffffcf=FFffffb8=FFffffb?=
Thu Aug 26 19:56:52 HKT 2004

rt
 
哪为大虾能解答我的问题



---------------------------------
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
美女明星应有尽有,搜遍美图、艳图和酷图
1G就是1000兆,雅虎电邮自助扩容!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.exoweb.net/pipermail/python-chinese/attachments/20040826/f35cc0c2/attachment.html

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年08月26日 星期四 20:57

limodou chatme at 263.net
Thu Aug 26 20:57:27 HKT 2004

/2ZmZmZjNv9mZmZmYzb/ZmZmZmNi/2ZmZmZlOf9mZmZmY2b/ZmZmZmI4/2ZmZmZiMP9mZmZmZmIs
xPq6w6OhDQoNCgnU2mxpbnV4z8LT0NDttuC1xGd1abD8v8nS1Mq508PP83RjbC90aywgcHlndGss
cHlxdCx3eFB5dGhvbru509DG5Mv80rvQqaOsz+vTw8TEuPa2vNDQoaMNCg0KPT09PT09PSAyMDA0
LTA4LTI2IDE5OjU2OjUyIMT61NrAtNDF1tDQtLXAo7o9PT09PT09DQoNCj5ydA0KPiANCj7ExM6q
tPPPusTcveK08M7StcTOysziDQo+DQo+DQo+DQo+LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tDQo+RG8gWW91IFlhaG9vIT8NCj4xNTDN8sf6TVAzt+i/8cvRo6y0+MT6tLPI69L0wNa1
7szDDQo+w8DFrsP30MfTptPQvqHT0KOsy9Gx6cPAzbyhotHezby6zb/hzbwNCj4xR77NyscxMDAw
1dejrNHFu6K159PK19TW+sCpyN2joQ0KPl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fDQo+cHl0aG9uLWNoaW5lc2UgbGlzdA0KPnB5dGhvbi1jaGluZXNlQGxp
c3RzLnB5dGhvbi5jbg0KPmh0dHA6Ly9weXRob24uY24vbWFpbG1hbi9saXN0aW5mby9weXRob24t
Y2hpbmVzZQ0KPg0KDQo9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0NCgkJ
CQ0KDQqhoaGhoaGhoaGhoaGhoaGh1sINCsDxo6ENCiANCgkJCQkgDQqhoaGhoaGhoaGhoaGhoaGh
bGltb2RvdQ0KoaGhoaGhoaGhoaGhoaGhoWNoYXRtZUAyNjMubmV0DQqhoaGhoaGhoaGhoaGhoaGh
oaGhoTIwMDQtMDgtMjYNCg0K




[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

2004年08月26日 星期四 20:57

limodou chatme at 263.net
Thu Aug 26 20:57:27 HKT 2004

mdkr,您好!

	你的代码我运行了没有问题。看看是不是你装了plone了,删了就行了。

======= 2004-08-26 15:32:08 您在来信中写道:=======

>就这代码,我CP了一个DEMO里的代码:
>#----------------------------------------------------------------------
># A very simple wxPython example.  Just a wxFrame, wxPanel,
># wxStaticText, wxButton, and a wxBoxSizer, but it shows the basic
># structure of any wxPython application.
>#----------------------------------------------------------------------
>
>import wx
>
>
>class MyFrame(wx.Frame):
>    """
>    This is MyFrame.  It just shows a few controls on a wxPanel,
>    and has a simple menu.
>    """
>    def __init__(self, parent, title):
>        wx.Frame.__init__(self, parent, -1, title,
>                          pos=(150, 150), size=(350, 200))
>
>        # Create the menubar
>        menuBar = wx.MenuBar()
>
>        # and a menu 
>        menu = wx.Menu()
>
>        # add an item to the menu, using \tKeyName automatically
>        # creates an accelerator, the third param is some help text
>        # that will show up in the statusbar
>        menu.Append(wx.ID_EXIT, "E&xit;\tAlt-X", "Exit this simple sample")
>
>        # bind the menu event to an event handler
>        self.Bind(wx.EVT_MENU, self.OnTimeToClose, id=wx.ID_EXIT)
>
>        # and put the menu on the menubar
>        menuBar.Append(menu, "&File;")
>        self.SetMenuBar(menuBar)
>
>        self.CreateStatusBar()
>        
>
>        # Now create the Panel to put the other controls on.
>        panel = wx.Panel(self)
>
>        # and a few controls
>        text = wx.StaticText(panel, -1, "Hello World!")
>        text.SetFont(wx.Font(14, wx.SWISS, wx.NORMAL, wx.BOLD))
>        text.SetSize(text.GetBestSize())
>        btn = wx.Button(panel, -1, "Close")
>        funbtn = wx.Button(panel, -1, "Just for fun...")
>
>        # bind the button events to handlers
>        self.Bind(wx.EVT_BUTTON, self.OnTimeToClose, btn)
>        self.Bind(wx.EVT_BUTTON, self.OnFunButton, funbtn)
>
>        # Use a sizer to layout the controls, stacked vertically and with
>        # a 10 pixel border around each
>        sizer = wx.BoxSizer(wx.VERTICAL)
>        sizer.Add(text, 0, wx.ALL, 10)
>        sizer.Add(btn, 0, wx.ALL, 10)
>        sizer.Add(funbtn, 0, wx.ALL, 10)
>        panel.SetSizer(sizer)
>        panel.Layout()
>
>
>    def OnTimeToClose(self, evt):
>        """Event handler for the button click."""
>        print "See ya later!"
>        self.Close()
>
>    def OnFunButton(self, evt):
>        """Event handler for the button click."""
>        print "Having fun yet?"
>
>
>class MyApp(wx.App):
>    def OnInit(self):
>        frame = MyFrame(None, "Simple wxPython App")
>        frame.Show(True)
>        self.SetTopWindow(frame)
>        return True
>        
>app = MyApp(True)
>app.MainLoop()
>
>
>----- Original Message ----- 
>From: "limodou" <chatme at 263.net>
>To: <python-chinese at lists.python.cn>
>Sent: Thursday, August 26, 2004 2:48 PM
>Subject: Re: [python-chinese]奇怪的wxPython
>
>
>> mdkr,您好!
>> 
>> 代码贴出来。
>> 
>>     一般是
>> 
>>     from wx import *
>> 
>>     frame = Frame()
>> 
>>     这里wx可以省略
>> 
>>     如果import wx
>> 
>>     frame = wx.Frame() 
>>    
>>     wx不可以省略
>> 
>> ======= 2004-08-26 14:41:10 您在来信中写道:=======
>> 
>> >我刚装的wxPython2.5
>> >现在Frame好象是先import wx然后再wx.Frame吧?
>> >为什么DEMO上可以,我写的代码却说:
>> >Traceback (most recent call last):
>> >  File "", line 1, in ?
>> >AttributeError: 'module' object has no attribute 'Frame'
>> >呢?_______________________________________________
>> >python-chinese list
>> >python-chinese at lists.python.cn
>> >http://python.cn/mailman/listinfo/python-chinese
>> >
>> 
>> = = = = = = = = = = = = = = = = = = = =
>> 
>> 
>>         致
>> 礼!
>>  
>> 
>>         limodou
>>         chatme at 263.net
>>           2004-08-26
>> 
>> 
>
>
>--------------------------------------------------------------------------------
>
>
>> _______________________________________________
>> python-chinese list
>> python-chinese at lists.python.cn
>> http://python.cn/mailman/listinfo/python-chinese
>> _______________________________________________
>python-chinese list
>python-chinese at lists.python.cn
>http://python.cn/mailman/listinfo/python-chinese
>

= = = = = = = = = = = = = = = = = = = =
			

        致
礼!
 
				 
        limodou
        chatme at 263.net
          2004-08-26


[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号