随笔分类 -  python

摘要:一、文件操作 1.操作google sheet credentials_file_path = os.path.abspath("./credentials.json") # 授权:authorize(): 这是 pygsheets 库中的一个函数,用于授权对 Google Sheets 的访问。为 阅读全文
posted @ 2024-02-23 14:45 方园FPP 阅读(22) 评论(0) 推荐(0)
摘要:一、区别 1.python有range和切片,go只有range,java都没有 2.运行: python:python3 路径/文件名.py eg.python3 AlgorithmQuestions/StringDivision.py go: go run 路径/文件名.go 3.函数调用 py 阅读全文
posted @ 2024-02-20 16:25 方园FPP 阅读(52) 评论(0) 推荐(0)
摘要:(1.setup_function、teardown_function 2.setup_class、teardown_class 3.setup_method、teardown_method 4.setup_module、teardown_module) setup/teardown和unittes 阅读全文
posted @ 2021-01-31 15:15 方园FPP 阅读(126) 评论(0) 推荐(0)
摘要:python3环境(建议3.6版本及以上) Python和Pycharm安装指引 29如果不是需要频繁切换python环境的话,不需要安装Pyenv。python安装未勾选添加path的话,需要自己手动将python根目录和python/Script目录配置到环境变量path中pycharm安装(安 阅读全文
posted @ 2021-01-06 16:28 方园FPP 阅读(196) 评论(0) 推荐(0)
摘要:1. 九九乘法表: for i in range(1,10): r = '' for j in range(1,i+1): r = r + str(j) + '*' + str(i) + '=' + str(j*i) + ' ' print r 2. 序列实现冒泡排序:arr = [2,9,1,6, 阅读全文
posted @ 2021-01-03 13:56 方园FPP 阅读(94) 评论(0) 推荐(0)
摘要:1. pytest介绍 带有init方法的类,被认为是带有特殊功能的类,就不是测试用例类 2. pytest配置 要想打印log日志,必须配置pytest.ini:pytest会捕获日志,导致运行时未显示日志 [pytest] addopts = -sv --log-cli-level=INFO 3 阅读全文
posted @ 2020-12-13 15:39 方园FPP 阅读(962) 评论(0) 推荐(0)
摘要:安装 Python Python 版本不限,示例为3.6.5,建议最新版本安装软件依赖使用的是 root 用户,安装软件使用的是普通用户,没有使用 root 用户。 macOS 下配置 安装 Python 安装软件依赖 brew install readline openssl xz zlib 安装 阅读全文
posted @ 2020-12-11 01:17 方园FPP 阅读(303) 评论(0) 推荐(0)
摘要:一、软件安装 python3环境(建议3.6版本及以上) Python和Pycharm安装指引 13如果不是需要频繁切换python环境的话,不需要安装Pyenv。python安装未勾选添加path的话,需要自己手动将python根目录和python/Script目录配置到环境变量path中pych 阅读全文
posted @ 2020-12-11 00:51 方园FPP 阅读(565) 评论(0) 推荐(0)