2011年8月15日
摘要: 何事长向别时圆我会天马流星拳 阅读全文
posted @ 2011-08-15 13:55 eth0 阅读(86) 评论(0) 推荐(0) 编辑
2011年8月10日
摘要: # 看了一段时间了Python,看了一下Qt,花了2个多小时根据terix写了这个漏洞挺多的snake<画图,时间,event># 写的过程中发现 对界面大小方面不懂,乱筹才分成这21x21的格子...# 测试时发现对于那种处在边缘的格子 方法应该不对,先不管啦!!!# 希望每一天都有收获!!!import sysfrom PyQt4 import QtGui,QtCoreimport random,copyoardMap = [[ [0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0], [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 阅读全文
posted @ 2011-08-10 11:03 eth0 阅读(262) 评论(0) 推荐(0) 编辑
2011年8月5日
摘要: # -*- coding:utf-8 -*-import sipsip.setapi('QVariant', 2)from PyQt4 import QtGui,QtCoreimport sys,winsoundclass DigitalClock(QtGui.QLCDNumber): def __init__(self, parent=None): #super(DigitalClock, self).__init__(parent) QtGui.QLCDNumber.__init__(self,parent) self.setSegmentStyle(QtGui.QLCDN 阅读全文
posted @ 2011-08-05 09:45 eth0 阅读(258) 评论(0) 推荐(0) 编辑
2011年8月2日
摘要: #-*- coding:utf-8 -*-import os,sys,glob,shutilpath = "D:\\Music"path_ = "F:\\Music 2012"temp = 0delete = []##os.mkdir(path)def visit(arg,dirlist,filelist): for filename in filelist: tem = os.path.join(dirlist,filename) delete.append(tem) if os.path.isfile(tem) and os.path.splitex 阅读全文
posted @ 2011-08-02 16:47 eth0 阅读(183) 评论(0) 推荐(0) 编辑
2011年8月1日
摘要: Python中的文件和目录操作责任编辑:覃里作者:IT168 宇文 2009-07-28 【IT168 技术文档】摘要:对于文件和目录的处理,虽然可以通过操作系统命令来完成,但是Python语言为了便于开发人员以编程的方式处理相关工作,提供了许多处理文件和目录的内置函数。重要的是,这些函数无论是在Unix、Windows还是Macintosh平台上,它们的使用方式是完全一致的。 本文将详细解释这些函数的使用方法。首先,我们介绍Python语言中类似于Windows系统的dir命令的列出文件功能,然后描述如何测试一个文件名对应的是一个标准文件、目录还是链接,以及提取文件大小和日期的方法。之后,我 阅读全文
posted @ 2011-08-01 14:08 eth0 阅读(1526) 评论(0) 推荐(0) 编辑
2011年7月21日
摘要: #-*- coding:gb2312 -*-import sysfrom PyQt4 import QtGui,QtCoredef create_page(): page = QtGui.QWizardPage() page.setTitle('introduction') page.setSubTitle('hello') label = QtGui.QLabel('xxxxxxx') label.setWordWrap(True) layout = QtGui.QVBoxLayout() layout.addWidget(label) pag 阅读全文
posted @ 2011-07-21 08:45 eth0 阅读(235) 评论(0) 推荐(0) 编辑
2011年7月19日
摘要: import sys,osdef get(path): allfile = {} for root,dirs,files in os.walk(path): for onefile in files: fname = os.path.join(root,onefile) fsize = os.stat(fname).st_size if allfile.has_key(fsize): allfile[fsize].append(fname) else: allfile[fsize] = [fname] fsize_key = allfile.keys() fsize_key.sort() re 阅读全文
posted @ 2011-07-19 16:00 eth0 阅读(286) 评论(0) 推荐(0) 编辑
2011年7月18日
摘要: 1 from PyQt4 import QtCore, QtGui 2 3 4 class MainWindow(QtGui.QMainWindow): 5 def __init__(self, parent=None): 6 super(MainWindow, self).__init__(parent) 7 8 self.setupFileMenu() 9 self.setupHelpMenu() 10 self.setupEditor() 11 12 self.setCentralWidget(self.editor) 13 self.setWindowTitle("Synta 阅读全文
posted @ 2011-07-18 11:09 eth0 阅读(521) 评论(0) 推荐(0) 编辑
2011年7月17日
摘要: from PyQt4 import QtCore, QtGuiclass MainWindow(QtGui.QMainWindow): def __init__(self): super(MainWindow,self).__init__() self.selectedDate = QtCore.QDate.currentDate() self.fontSize = 10 centralWidget = QtGui.QWidget() dateLabel = QtGui.QLabel('date') monthCombo = QtGui.QComboBox() for mont 阅读全文
posted @ 2011-07-17 12:34 eth0 阅读(340) 评论(0) 推荐(0) 编辑
2011年7月12日
摘要: from PyQt4 import QtGuiif __name__ == '__main__': import sys app = QtGui.QApplication(sys.argv) model = QtGui.QDirModel() tree = QtGui.QTreeView() tree.setModel(model) tree.setAnimated(False) # 展开方式 tree.setIndentation(20) # 压痕 tree.setSortingEnabled(True) # 排序 tree.setWindowTitle("Dir 阅读全文
posted @ 2011-07-12 10:40 eth0 阅读(190) 评论(0) 推荐(0) 编辑