随笔分类 - Python
python
摘要:1.用微软提供的扩展库win32com来操作IE
2.用selenium的webdriver
3.用python自带的HTMLParser解析
阅读全文
摘要:py脚本开头加上:1 # -*- coding:utf-8 -*-注意:一定要这种格式!看到其他网站有各种格式,不一一列举,,有兴趣自行问度娘。 其他格式容易出问题!在某些情况下容易报错!cnstr就是你的中文字符串,做一下判断:如果是unicode,直接转码,如果不是,先解码再转码(解码前要知...
阅读全文
摘要:一、Python中的线程使用:Python中使用线程有两种方式:函数或者用类来包装线程对象。1、函数式:调用thread模块中的start_new_thread()函数来产生新线程。如下例: 1 import time 2 import thread 3 def timer(no, inte...
阅读全文
摘要:Splinter 快速介绍官方网站:http://splinter.cobrateam.info/官方介绍:Splinter is an open source tool for testingweb applications using Python. It lets you automate b...
阅读全文
摘要:Python通过WMI模块获取Windows系统信息,对系统参数进行监控。
阅读全文
摘要:python发送邮件源码,包括txt文本邮件、HTML文本邮件。
阅读全文
摘要:sublime text插件SublimeCodeIntel会自动匹配并联想词汇, 这在换行的时候非常麻烦, 每次点Enter 都会误打出代码,下面分享解决方法。
阅读全文
摘要:SublimeCodeIntel--智能提示插件,这个插件的智能提示功能非常强大,可以自定义提示的内容库
阅读全文
摘要: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...
阅读全文
摘要: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 ...
阅读全文




浙公网安备 33010602011771号