xe5xb0x8fxe7x86x8a

随笔分类 -  Python

modbus_tk解析
摘要:>>> import modbus_tk >>> help(modbus_tk) Help on package modbus_tk: NAME modbus_tk - Modbus TestKit: Implementation of Modbus protocol in python DESCR 阅读全文

posted @ 2020-06-09 13:09 牡蛎君 阅读(2280) 评论(0) 推荐(0)

Python的正则表达式运用
摘要:正则表达式(regular expression,简称regex)是文本处理方面功能最强大的工具之一。正则表达式语言用来构造正则表达式(最终构造出来的字符串就称为正则表达式),正则表达式用来完成搜索和替换操作正则表达式语言是内置于其他语言或软件产品里的“迷你”语言,Python自1.5版本起增加了r 阅读全文

posted @ 2020-04-28 00:19 牡蛎君 阅读(551) 评论(0) 推荐(1)

【Python】计算日期间隔小程序
摘要:import datetime print('【计算日期间隔小程序】') isGoon = True def dateinput(datestr): for i in range(3): try: datedate = datetime.datetime.strptime( input('请输入%s 阅读全文

posted @ 2020-04-04 16:35 牡蛎君 阅读(714) 评论(0) 推荐(0)

【Python】测词汇量小工具
摘要:通过爬虫模拟扇贝网的测单词量功能 import requests import time headers = { 'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, lik 阅读全文

posted @ 2020-03-20 01:42 牡蛎君 阅读(804) 评论(0) 推荐(0)

风变编程笔记(二)-Python爬虫精进
摘要:关键字: requests BeautifulSoup html.parser str.strip() quote() json replace() openpyxl cookies session filter() tkinter selenium schedule gevent scrapy 第 阅读全文

posted @ 2020-02-27 16:09 牡蛎君 阅读(15166) 评论(3) 推荐(4)

【Python】关于print()、sys.stdout、sys.stderr的一些理解
摘要:print() 方法的语法: print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False) 其中file = sys.stdout的意思是,print函数会将内容打印输出到标准输出流(即 sys.stdout),当然也可以自定义输出 阅读全文

posted @ 2020-02-23 00:01 牡蛎君 阅读(15981) 评论(0) 推荐(0)

如何在MacOS的VScode上安装Python3
摘要:由于MacOS上的VScode默认安装的Python版本是2.7,所以需要我们自己手动安装Python3从Python官网下载最新版本-安装-设置环境变量当然是可行的,但下面要介绍的是另外一种方式:HomebrewHomebrew是macOS的软件包管理工具,所以不只是Python,缺失的软件包通过 阅读全文

posted @ 2020-02-22 15:15 牡蛎君 阅读(2627) 评论(0) 推荐(0)

风变编程笔记(一)-Python基础语法
摘要:关键字:print() type() input() append() pop() range() numpy math.ceil() index() @classmethod @staticmethod self __init__() __str__() split() join() random 阅读全文

posted @ 2020-02-20 02:17 牡蛎君 阅读(27721) 评论(0) 推荐(2)

导航