因为平时爱好摄影,所以喜欢看看色影无忌论坛的获奖摄影作品,所以写了个小script用来抓取上面的获奖图片,亲自测试可以使用。# -*- coding: UTF-8 -*-#作者Rocky Chen
import re, urllib, sys, os, time, urllib2, cookielib, string
class Download:
def __init__(self...
分类:
编程语言 时间:
2014-12-15 15:33:32
阅读次数:
207
#-*-coding:cp936-*-fromPyQt4.QtCoreimport*fromPyQt4.QtGuiimport*classInlineEditor(QWidget):_MUTE='MUTE'def__init__(self,parent):QWidget.__init__(self,...
分类:
其他好文 时间:
2014-12-15 00:05:58
阅读次数:
287
#!/usr/bin/envpython#-*-coding:utf-8-*-fromPyQt4importQtGui,QtCore,QtWebKitclassMyPage(QtWebKit.QWebPage):def__init__(self,parent=None):super(MyPage,s...
分类:
其他好文 时间:
2014-12-14 23:57:35
阅读次数:
302
class multitable{
def makeRowSeq(row: Int) =
for(col <- 1 to 10) yield {
val prod = (row * col).toString;//prod=行号*列号
val padding = " " * (4 - prod.length);//添加padding个空格
padding + pr...
分类:
其他好文 时间:
2014-12-14 22:42:44
阅读次数:
211
importsysfromPyQt4.QtGuiimport*classBrowser(QWidget):def__init__(self):super(Browser,self).__init__()self.resize(700,600)self.setWindowTitle("FileBrow...
分类:
其他好文 时间:
2014-12-14 22:39:26
阅读次数:
225
#-*-coding:cp936-*-#!/usr/bin/envpython#-*-coding:utf-8-*-fromPyQt4importQtCore,QtGuiclassWindow(QtGui.QMainWindow):def__init__(self):super(Window,sel...
分类:
其他好文 时间:
2014-12-14 22:37:22
阅读次数:
251
importsysfromPyQt4.QtCoreimport*fromPyQt4.QtGuiimport*fromPyQt4.QtWebKitimport*classMyBrowser(QWidget):def__init__(self,parent=None):super(MyBrowser,s...
分类:
其他好文 时间:
2014-12-14 22:34:10
阅读次数:
160
DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think...
分类:
其他好文 时间:
2014-12-14 21:14:42
阅读次数:
152
# __str__() class Dog(object): ? ? def __init__(self,name): ? ? ? ? self.name = name ? ? def __str__(self): ? ? ? ? return ‘Dog object(%s)‘ % self.name print Dog(‘papa‘) # <__main__.Do...
分类:
编程语言 时间:
2014-12-14 13:25:11
阅读次数:
231
有4种情况,会造成“编译器必须为 未申明constructor的classes合成default constructor。
1.带有default constructor的member class object
如果一个class没有任何constructor,但是内含一个member object ,而后者有default constructor,那么这个class的implicit def...
分类:
编程语言 时间:
2014-12-14 10:46:33
阅读次数:
124