1.创建新类Athlete,创建两个唯一的对象实例sarah james,他们会继承Athlete类的特性>>> class Athlete: def __init__(self,a_name,a_dob=None,a_times=[]): self.name=a_name self.dob=a.....
分类:
编程语言 时间:
2015-09-30 16:31:04
阅读次数:
315
以第一ppt网站为例:http://www.1ppt.com/ from pyspider.libs.base_handler import * import urllib2,HTMLParser,re import urllib2,HTMLParser,re #根url host = "http:...
分类:
其他好文 时间:
2015-09-30 16:21:06
阅读次数:
2037
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Created on 2015-03-20 09:46:20 # Project: fly_spider import re import time #from pyspider.database.m...
分类:
其他好文 时间:
2015-09-30 16:18:59
阅读次数:
150
0表示标准输入1表示标准输出2表示标准错误输出> 默认为标准输出重定向,与 1> 相同2>&1 意思是把 标准错误输出 重定向到 标准输出.&>file 意思是把 标准输出 和 标准错误输出 都重定向到文件file中举例(test.py)python test.py >right 2>&1 &>al...
分类:
编程语言 时间:
2015-09-30 16:13:50
阅读次数:
166
#-*-coding=utf-8-*-
#__author__=‘sanr‘
#__email__=‘5754190@qq.com‘
#__url__=‘http://0x007.blog.51cto.com/‘
#__version__=‘0.1‘
importrequests
importre
fromthreadingimportThread,Lock
importtime
importsys
importchardet
importnetaddr
importstruct
importsocket
..
分类:
Web程序 时间:
2015-09-30 14:43:51
阅读次数:
223
Meeting time: 2015.September.29th 1:00~2:00Chairperson: Serg Melikyan, PTL from MirantisMeeting summary:1.RabbitMQ Driver Desc: Murano used kombu...
分类:
其他好文 时间:
2015-09-30 14:30:02
阅读次数:
184
转自:洒洒 链接http://www.cnblogs.com/thinksasa/p/3283695.html安装PIL-1.1.7.win32-py2.7的时候,不能再注册表中识别出来python2.7方法:新建一个register.py 文件,把一下代码贴进去,保存## script to re...
分类:
编程语言 时间:
2015-09-30 14:23:00
阅读次数:
254
repr是对python解释器友好的,就是会以合法的python表达式的形式来表示值,返回一个可以用来表示对象的可打印字符串。 官方解释: Python 手册: Return a string containing a printable representation of an obje...
分类:
其他好文 时间:
2015-09-30 13:03:09
阅读次数:
157
最近想尝试一下python。发现vs2015提供了python的一些项目模版。其中有大名鼎鼎的web框架Django。创建好项目后,直接调试运行是有错误的,提示找不到Django的模块,No module named 'django'。网上搜索了一下,有朋友也有这样的问题,不过跟我的情况可能不同。(...
分类:
编程语言 时间:
2015-09-30 12:58:54
阅读次数:
495
Question:Implement the following operations of a queue using stacks.push(x) -- Push element x to the back of queue.pop() -- Removes the element from i...
分类:
其他好文 时间:
2015-09-30 12:54:29
阅读次数:
119