wxPython用起来真简单-空窗口

imouse posted @ 2012年10月21日 02:47 in python with tags wxPython , 1554 阅读

    wxPython能够快速建立UI,特别适合小工具或模型开发.趁业余有时间,开始用他写些东西,以便熟悉UI设计.

    今天,先来段最简单的: 

#!/usr/bin/env python  

"""bare.py is a starting point for a wxPython program."""   

import wx 

class Frame(wx.Frame):   
    pass 

class App(wx.App):
   
    def OnInit(self):   
        self.frame = Frame(parent=None, title='bare')  
        self.frame.Show() 
        self.SetTopWindow(self.frame)   
        return True 

if __name__ == '__main__':   
    app = App() 
    app.MainLoop() 

     实在不能再简单了,一个应用APP和一个Frame构成了整个程序.

Avatar_small
seo service UK 说:
2024年2月23日 19:52

This specific is generally clearly basic and in addition exceptional truth alongside without a doubt reasonable and besides in fact valuable My business is seeking find ahead of time intended for this particular helpful stuff


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter