摘要: import linecache def eachlineof(filename): with open(filename, 'r') as f: for cnt, line in enumerate(f): a = str(cnt) + ',' + line.strip('\n') yield a 阅读全文
posted @ 2017-02-21 23:44 idlewith 阅读(111) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2017-02-21 19:23 idlewith 阅读(0) 评论(0) 推荐(0) 编辑
摘要: python内置的方法,太简单了。。。 from datetime import datetime,timedelta d = datetime.now() z = d + timedelta(days= 7) print str(z).split(' ')[0].split(' ')[1] imp 阅读全文
posted @ 2017-02-20 18:11 idlewith 阅读(273) 评论(0) 推荐(0) 编辑
摘要: 前目的地 遗忘清单 阅读全文
posted @ 2017-02-18 19:00 idlewith 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 把 转换成 C:\Python27\Lib\site packages\PyQt4\uic\pyuic.py o t.py t.ui 使用ui布局 阅读全文
posted @ 2017-02-10 10:11 idlewith 阅读(291) 评论(0) 推荐(0) 编辑
摘要: coding:utf 8 import sys from PyQt4.QtGui import (QApplication, QWidget, QPushButton, QLineEdit, QHBoxLayout, QVBoxLayout, QColorDialog, QInputDialog, 阅读全文
posted @ 2017-02-10 00:42 idlewith 阅读(308) 评论(0) 推荐(0) 编辑
摘要: 首先新建一个 .qrc 文件,内容格式如下: in the Terminal: inner_image.py 阅读全文
posted @ 2017-02-10 00:09 idlewith 阅读(221) 评论(0) 推荐(0) 编辑
摘要: qt安装包地址 http://download.qt.io/archive/qt/5.8/5.8.0/ pyqt4 64 http://www.cnblogs.com/zouzf/p/4308912.html pyqt tutorial http://zetcode.com/gui/pyqt4/me 阅读全文
posted @ 2017-02-09 19:11 idlewith 阅读(180) 评论(0) 推荐(0) 编辑
摘要: ''' integer 1,100, 8080,0 0xff00,0xa5b4c3a2 float 1.23,3.14, 9.01 1.23x109 = 1.23e9 string 'abc' "xyz" 'I\'m \"OK\"!' = I\'m "OK"! ''' '''I'm "OK"!''' 阅读全文
posted @ 2017-02-08 00:46 idlewith 阅读(151) 评论(0) 推荐(0) 编辑
摘要: coding:utf 8 class _SingletonWrapper: """ A singleton wrapper class. Its instances would be created for each decorated class. """ def __init__(self, c 阅读全文
posted @ 2017-02-04 14:18 idlewith 阅读(130) 评论(0) 推荐(0) 编辑