发布于 2016-01-04 03:05:46 | 223 次阅读 | 评论: 0 | 来源: PHPERZ

这里有新鲜出炉的精品教程,程序狗速度看过来!

wxPython Python GUI图形库

wxPython是Python语言的一套优秀的GUI图形库,允许Python程序员很方便的创建完整的、功能键全的GUI用户界面。 wxPython是作为优秀的跨平台GUI库wxWidgets的Python封装和Python模块的方式提供给用户的。


因为官方的http://wiki.wxpython.org/InstallingOnUbuntuOrDebian 并没有wheezy的

所以这里我们直接去仓库搜吧

root@debian:/# apt-cache search python-wxgtk
python-wxgtk2.8 - wxWidgets Cross-platform C++ GUI toolkit (wxPython binding)
python-wxgtk2.8-dbg - wxWidgets Cross-platform C++ GUI toolkit (wxPython binding, debug version)
root@debian:/# apt-get install python
Display all 1846 possibilities? (y or n)
root@debian:/# apt-get install python-wxgtk2.8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libgadu3
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
  python-wxversion
Suggested packages:
  wx2.8-doc wx2.8-examples editra
The following NEW packages will be installed:
  python-wxgtk2.8 python-wxversion
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 8,671 kB of archives.
After this operation, 33.8 MB of additional disk space will be used.

现在写个简单的Hello world测试下吧

#!/usr/bin/env python
# coding=utf-8
import wx
app = wx.App(False)
frame = wx.Frame(None, wx.ID_ANY, "Hello World!")
frame.Show(True)
app.MainLoop()

运行下这个py文件. GUI的就OK了, enjoy ~


 

 


最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务