随笔分类 -  Python

摘要:第一步:执行第一个next(gen),执行到语句value = (yield 1)后,执行被挂起,直接返回yield关键字后面表达式的值即为1,所以next(gen)结果为1;注意此时并没有执行value的赋值 第二步:执行第二个next(gen)时,从上一个挂起位置的下一行开始,也就是从 prin 阅读全文
posted @ 2021-07-15 12:10 pandaly 阅读(98) 评论(0) 推荐(0) 编辑
摘要:文件头部注释 #!/usr/bin/env python # -*- coding: UTF-8 -*- """ @Project :JDCouponOffice @File :test.py @Author :panda @Date :2021/3/26 10:56 """ 函数自动注释 定义函数 阅读全文
posted @ 2021-03-26 11:10 pandaly 阅读(998) 评论(0) 推荐(1) 编辑
摘要:1 Python 1.1 chm下载 1.2 目录介绍 1.3 Pip命令使用 Pip:python包安装和管理工具 a) 安装包 pip install selenium b) 卸载包 pip uninstall selenium c) 显示安装了哪些文件 pip show selenium 2 阅读全文
posted @ 2020-08-05 19:14 pandaly 阅读(281) 评论(0) 推荐(0) 编辑
摘要:yml文件的更新后工具类: import os import yaml class YamlUtils(): def __init__(self,folder_name='config'): self.foler_name = folder_name def get_yaml_load(self, 阅读全文
posted @ 2020-07-09 15:52 pandaly 阅读(6460) 评论(1) 推荐(2) 编辑
摘要:import os pwd = os.getcwd() print("当前目录: " + pwd) father_path_method1 = os.path.dirname(pwd) print("当前目录的父目录_方式一: " + father_path_method1) separator = 阅读全文
posted @ 2020-06-29 10:44 pandaly 阅读(3730) 评论(0) 推荐(0) 编辑
摘要:这可能是因为该站点使用过期的或不安全的 TLS 安全设置。 解决:依次打开IE的Internet选项、高级,往下拉,找到安全模块,勾上四个使用:使用SSL 3.0、使用TLS 1.0、使用TLS 1.1、TLS 1.2,点击确定,刷新页面重试。 阅读全文
posted @ 2020-03-21 21:30 pandaly 阅读(16941) 评论(0) 推荐(0) 编辑
摘要:1. 下载破解补丁,https://pan.baidu.com/s/1mcQM8CLUnweY02ahKEr4PQ ,下载最新上传的压缩包 2. 将压缩包解压,里面有激活文件ACTIVATION_CODE 和破解补丁jetbrains-agent 3. 将破解补丁jetbrains-agent复制到 阅读全文
posted @ 2019-12-10 21:15 pandaly 阅读(61630) 评论(15) 推荐(3) 编辑
摘要:下载chromedriver: http://chromedriver.storage.googleapis.com/index.html chromedriver与chrome的的对应版本: 驱动的下载地址如下:http://chromedriver.storage.googleapis.com/ 阅读全文
posted @ 2019-12-10 17:15 pandaly 阅读(569) 评论(0) 推荐(0) 编辑
摘要:1 安装xlrd、xlwt、xlutils 2 模块的基本用法: 2.1 打开excel文件 2.2 复制一个excel对象 2.3 添加excel工作表 2.4 获取excel工作表sheet 2.5 获取表名,行数和列数 2.6 获取一行和一列 2.7 获取单元格数据 2.8 获取单元格属性 2 阅读全文
posted @ 2019-03-13 21:02 pandaly 阅读(6442) 评论(0) 推荐(0) 编辑
摘要:常用快捷键 快捷键功能 Ctrl + Q 快速查看文档 Ctrl + F1 显示错误描述或警告信息 Ctrl + / 行注释(可选中多行) Ctrl + Alt + L 代码格式化 Ctrl + Alt + O 自动导入 Ctrl + Alt + I 自动缩进 Tab / Shift + Tab 缩 阅读全文
posted @ 2019-03-07 15:45 pandaly 阅读(3730) 评论(0) 推荐(0) 编辑
摘要:配置文件的格式 a) 配置文件中包含一个或多个 section, 每个 section 有自己的 option; b) section 用 [sect_name] 表示,每个option是一个键值对,使用分隔符 = 或 : 隔开; c) 在 option 分隔符两端的空格会被忽略掉 d) 配置文件使 阅读全文
posted @ 2018-12-14 11:31 pandaly 阅读(445) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示