python爬虫使用笔记

8-09 3,044 views

所需模块包 import requests url请求 import threading 多线程 from bs4 import BeautifulSoup 网页抓取元素扩展,类似JQ import datetime 时间库 import has...
阅读全文 0

Linux中find批量删除空文件及空文件夹脚本

8-08 3,355 views

转自:http://www.111cn.net/sys/linux/46433.htm linux下批量删除空文件(大小等于0的文件)的方法  代码如下 find . -name “*” -type f ...
阅读全文 0

Python删除目录下的文件以及文件夹

8-08 3,070 views

#!/usr/bin/env python import os import shutil filelist=[] rootdir="/home/zoer/aaa" filelist=os.listdir(rootdir) for f in filelist: ...
阅读全文 0

Python下OS模块强大的重命名方法renames

6-08 2,759 views

在python中有很多强大的模块,其中我们经常要使用的就是OS模块,OS模块提供了超过200个方法来供我们使用,并且这些方法都是和数据处理相关的,这里介绍下重命...
阅读全文 0

python批量修改文件名

6-08 3,604 views

import os import fnmatch #path写路径,fnexp写文件后缀. def iterfindfiles(path, fnexp): for root, dirs, files in os.walk(path): for filename in fnma...
阅读全文 0

head first python 源代码

6-05 6,595 views

head first python 源代码 head first python下载: http://download.csdn.net/download/fangwentong2012/7160347 点击下载
阅读全文 0

python中打开关闭文件的方法

6-01 2,597 views

"python写文件" try: with open('123.txt','r') as data: print('It is ..',file=data) except IOError as err: print('File ...
阅读全文 0

python递归打印多维列表

6-01 3,228 views

递归打印多维列表 __author__ = 'Administrator' cast = ['a','b','c','d',['aa','bb','cc',['aaa','bbb','ccc']]] print(cast) def print_lol(the_list): ...
阅读全文 0

python中获取python版本号的方法

6-01 4,184 views

python中获取python版本号的方法 "方法一" #!/usr/bin/python import platform print platform.python_version() "方法二" #!...
阅读全文 0

在Linux CentOS 6.6上安装Python 2.7.9

5-30 3,188 views

CentOS 6.6自带的是Python 2.6.6,而编译llvm需要Python 2.7以上。 checking for python... /usr/bin/python checking for python >= 2.7... not found ...
阅读全文 0