上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 16 下一页
摘要: 1.通过命令行1秒启动一个下载服务器 2.通过命令行将字符串转JSON 3.通过命令行判断第三方库是否安装 阅读全文
posted @ 2019-10-21 22:13 ForLivetoLearn 阅读(171) 评论(0) 推荐(0) 编辑
摘要: pip常用命令 install:安装软件 download:下载软件 uninstall:卸载软件 freeze:输出本地软件环境到文件中pip freeze > requirements.txt,可以在其他服务器通过pip install -r requirements.txt直接安装软件 lis 阅读全文
posted @ 2019-10-21 22:06 ForLivetoLearn 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 安装python3环境 #1.安装依赖条件 yum install gcc patch libffi-devel python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel t 阅读全文
posted @ 2019-10-14 16:26 ForLivetoLearn 阅读(382) 评论(0) 推荐(0) 编辑
摘要: 进程:资源分配的基本单位,进程数量为cpu核数+1,os.cpu_count()。计算密集时,使用进程 守护进程随着主进程的最后一句代码结束而结束 使用process模块可以创建进程 方法 多进程启动 属性 示例 锁机制 信号机制 事件机制 队列 进程间共享内存 进程池 阅读全文
posted @ 2019-09-26 15:49 ForLivetoLearn 阅读(605) 评论(0) 推荐(0) 编辑
摘要: 1.socket参数 2.TCPsocket常用方法 TCP socket client server 实例化 sk = socket.socket() sk = socket.socket() 绑定地址开启监听 / sk.bind(('127.0.0.1',8888))sk.listen() 连接 阅读全文
posted @ 2019-09-18 15:06 ForLivetoLearn 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 1.导入模块 >>> import logging 2.五种日志级别 #输出时默认只显示警告级别以上的信息,可以使用basicConfig的level参数更改 >>> logging.basicConfig(level=logging.DEBUG) ... logging.debug('调试') . 阅读全文
posted @ 2019-09-17 13:53 ForLivetoLearn 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 比urllib.request更方便的爬虫工具 官方中文文档:http://cn.python-requests.org/zh_CN/latest/ 安装 pip install requests # 或者用pycharm点点点 导入模块 >>> import requests 网页的基本用法,GE 阅读全文
posted @ 2019-09-06 10:38 ForLivetoLearn 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 官方文档:https://www.crummy.com/software/BeautifulSoup/bs4/doc.zh/ 使用前需要先安装模块,并安装解析器 pip install beautifulsoup4 pip install lxml pip install html5lib 安装完成 阅读全文
posted @ 2019-08-13 17:05 ForLivetoLearn 阅读(188) 评论(0) 推荐(0) 编辑
摘要: python使用正则表达式之前需要先倒入re模块 import re 可选标志位 re.A ASCII,使得 \w,\W,\b,\B,\s 和 \S 只匹配 ASCII 字符,而不匹配完整的 Unicode 字符。这个标志仅对 Unicode 模式有意义,并忽略字节模式。 re.I IGNORECA 阅读全文
posted @ 2019-08-12 16:58 ForLivetoLearn 阅读(1283) 评论(0) 推荐(0) 编辑
摘要: python使用代理的方法有两种 1. 2. 示例代码: 阅读全文
posted @ 2019-08-06 14:35 ForLivetoLearn 阅读(10450) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 16 下一页