上一页 1 ··· 15 16 17 18 19
摘要: 转自:http://www.2cto.com/kf/201311/258112.html今天有需求,需要把系统所有用户注册的id和邮箱等信息导出来提供给他们,在mysql里面count了下,大概有350万左右就尝试了下用python实现,顺带练习下python写csv的功能,本来想用工具的,但想了下... 阅读全文
posted @ 2014-12-24 16:09 郭导技术小站 阅读(3407) 评论(0) 推荐(0) 编辑
摘要: sys.path和os.path1.sys.path是python搜索模块的路径集合,是个list;os.path是os的一个模块,是操作文件和目录的模块2.sys.path和PYTHONPATH首先PYTHONPATH可以通过sys.path来查看可以通过sys.path.append(path)... 阅读全文
posted @ 2014-12-24 10:41 郭导技术小站 阅读(327) 评论(0) 推荐(0) 编辑
摘要: http://www.w3school.com.cn/xpath/xpath_syntax.asp 阅读全文
posted @ 2014-12-23 17:25 郭导技术小站 阅读(100) 评论(0) 推荐(0) 编辑
摘要: import osos.path.isfile('test.txt') #如果不存在就返回Falseos.path.exists(directory) #如果目录或文件不存在就返回False 阅读全文
posted @ 2014-12-23 09:39 郭导技术小站 阅读(263) 评论(0) 推荐(0) 编辑
摘要: 读写文件都要将中文转为unicode字符。读文件:u = unicode(s, 'gbk')这里不能使用encode写文件:u =encode('utf') 阅读全文
posted @ 2014-12-22 21:43 郭导技术小站 阅读(718) 评论(0) 推荐(0) 编辑
上一页 1 ··· 15 16 17 18 19