![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python
极速蜗牛z
做个优雅的程序猿
展开
-
Python实现一个双色球生成程序
#coding=utf-8# filename: redball.pyimport randomimport math'这是一个彩票生成程序, 可以随机生成双色球和大乐透'class newBall: _redQuantity = 0 _blueQuantity = 0 _redMax = 0 _blueMax = 0 _oneRecord =原创 2014-08-06 15:39:15 · 8276 阅读 · 0 评论 -
Python Tkinter 布局管理器
所有的Tkinter组件都包含专用的几何管理方法,这些方法是用来组织和管理整个父配件区中子配件的布局的。Tkinter提供了截然不同的三种几何管理类:pack、grid和place。 pack() pack几何管理采用块的方式组织配件,在快速生成界面设计中广泛采用,若干组件简单的布局,采用pack的代码量最少。pack几何管理程序根据组件创建生成的顺序将组件添加到父组件中去转载 2015-02-27 17:18:07 · 2634 阅读 · 1 评论 -
ubuntu 下安装Python-tk
1. tk开发包: sudo apt-get install tk-dev2. Python的tk模块:sudo apt-get install python-tk原创 2014-12-15 11:15:35 · 24407 阅读 · 6 评论 -
ubuntu VNC远程访问
1. #apt-get install vnc4server2. #vncserver , 并设定密码3. #vim ~/.vnc/xstartup 把最后一行修改为:# x-window-manager &export DESKTOP_SESSION=Ubuntu-2d #这个 ubuntu-2d 参考 /usr/share/gnome-session/sessions/原创 2014-12-19 16:07:32 · 711 阅读 · 0 评论 -
如何部署Django
Note: Django 1.7.1 需要Python2.7 或者更高版本1. 使用 pip 部署Django1.1 下载pip , 链接:https://bootstrap.pypa.io/get-pip.py1.2 安装pip, python get-pip.py1.3 安装Django, pip install Django==1.7.11.4 检验是否安装成功原创 2014-12-03 09:20:19 · 816 阅读 · 0 评论 -
Python Tkinter 类
Tkinter ClassesWidget classesTkinter supports 15 core widgets:Tkinter 支持ButtonA simple button, used to execute a command or other operation.CanvasStructured graphics. This widget翻译 2014-08-15 21:27:17 · 3222 阅读 · 0 评论 -
Python Tkinter Hello,Tkinter
Hello, TkinterBut enough talk. Time to look at some code instead.As you know, every serious tutorial should start with a “hello world”-type example. In this overview, we’ll show you not翻译 2014-08-13 17:53:58 · 1213 阅读 · 0 评论 -
Python Tkinter Hello, Again
Hello, AgainWhen you write larger programs, it is usually a good idea to wrap your code up in one or more classes. The following example is adapted from the “hello world”program in Matt Conw翻译 2014-08-15 11:13:11 · 3296 阅读 · 0 评论 -
Python Tkinter是什么
What's Tkinter?什么是Tkinter?The Tkinter module (“Tk interface”) is the standard Python interface to the Tk GUI toolkit from Scriptics (formerly developed by Sun Labs).Both Tk and Tki翻译 2014-08-07 16:57:52 · 5628 阅读 · 0 评论 -
Python Tkinter 会话窗口
Dialog WindowsWhile the standard dialogs described in the previous section may be sufficient for many simpler applications, most larger applications require more complicated dialogs. For exa翻译 2014-08-12 14:33:46 · 11016 阅读 · 1 评论 -
Python Tkinter 事件和映射
Events and BindingsAs was mentioned earlier, a Tkinter application spends most of its time inside an event loop (entered via the mainloop method). Events can come from various sources, inclu翻译 2014-08-08 09:28:04 · 26922 阅读 · 0 评论 -
Python Tkinter 应用窗口
Application WindowsBase WindowsIn the simple examples we’ve used this far, there’s only one window on the screen; the root window. This is automatically created when you call the Tkconst翻译 2014-08-11 17:16:10 · 3407 阅读 · 0 评论 -
Python Tkinter 标准会话
Standard DialogsBefore we look at what to put in that application work area, let’s take a look at another important part of GUI programming: displaying dialogs and message boxes.在 St翻译 2014-08-12 14:00:19 · 1701 阅读 · 0 评论 -
Python连接数据库
的# -*- coding:utf-8 -*-# file: PyMySQL.pyimport MySQLdbdb = MySQLdb.connect(host='localhost',user='root',passwd='unsvr2012',db='world')cur = db.cursor()r = cur.execute('select * from country')r原创 2014-08-06 15:45:29 · 494 阅读 · 0 评论 -
面向对象程序的设计过程
1. 确定对象及其属性和方法2. 分析对象间的联系确定其通信机制3. 将具有共同特征的对象抽象为对象类4. 设计、实现类,确定类彼此间的继承关系5. 创建对象实例,实现对象间的相互关系原创 2015-03-16 22:13:21 · 749 阅读 · 0 评论