Fork me on GitHub

随笔分类 -  Python

python
摘要:1.用微软提供的扩展库win32com来操作IE 2.用selenium的webdriver 3.用python自带的HTMLParser解析 阅读全文
posted @ 2016-01-01 11:03 流柯 阅读(3854) 评论(1) 推荐(1)
摘要:py脚本开头加上:1 # -*- coding:utf-8 -*-注意:一定要这种格式!看到其他网站有各种格式,不一一列举,,有兴趣自行问度娘。 其他格式容易出问题!在某些情况下容易报错!cnstr就是你的中文字符串,做一下判断:如果是unicode,直接转码,如果不是,先解码再转码(解码前要知... 阅读全文
posted @ 2015-12-31 17:13 流柯 阅读(16442) 评论(0) 推荐(0)
摘要:一、Python中的线程使用:Python中使用线程有两种方式:函数或者用类来包装线程对象。1、函数式:调用thread模块中的start_new_thread()函数来产生新线程。如下例: 1 import time 2 import thread 3 def timer(no, inte... 阅读全文
posted @ 2015-12-11 17:22 流柯 阅读(8197) 评论(2) 推荐(0)
摘要:Splinter 快速介绍官方网站:http://splinter.cobrateam.info/官方介绍:Splinter is an open source tool for testingweb applications using Python. It lets you automate b... 阅读全文
posted @ 2015-12-07 16:07 流柯 阅读(7133) 评论(0) 推荐(1)
摘要:Python通过WMI模块获取Windows系统信息,对系统参数进行监控。 阅读全文
posted @ 2015-10-26 14:58 流柯 阅读(2358) 评论(5) 推荐(0)
摘要:python发送邮件源码,包括txt文本邮件、HTML文本邮件。 阅读全文
posted @ 2015-10-12 17:04 流柯 阅读(1168) 评论(1) 推荐(2)
摘要:sublime text插件SublimeCodeIntel会自动匹配并联想词汇, 这在换行的时候非常麻烦, 每次点Enter 都会误打出代码,下面分享解决方法。 阅读全文
posted @ 2015-09-21 14:32 流柯 阅读(2407) 评论(2) 推荐(1)
摘要:SublimeCodeIntel--智能提示插件,这个插件的智能提示功能非常强大,可以自定义提示的内容库 阅读全文
posted @ 2015-09-21 14:03 流柯 阅读(14971) 评论(0) 推荐(0)
摘要:1.将日志打印到屏幕1 import logging2 3 logging.debug('This is debug message---by liu-ke')4 logging.info('This is info message---by liu-ke')5 logging.warning('T... 阅读全文
posted @ 2015-04-21 15:20 流柯 阅读(3459) 评论(0) 推荐(0)
摘要:1 #-*- coding:utf-8 -*- 2 #__author__ = 'liu-ke' 3 import xlrd 4 from xlutils.copy import copy 5 mybook = xlrd.open_workbook("E:\liu-ke\user.xls") 6 ... 阅读全文
posted @ 2015-04-20 18:30 流柯 阅读(657) 评论(1) 推荐(0)

访客: 浏览: