上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 55 下一页

2022年12月26日

python 文件操作 11

摘要: 一.文件读取操作 1. 读取整个文件 在同级目录,创建一个pi_digits.txt文件和file_reader.py文件。 pi_digits.txt文件中加入内容 file_reader.py文件内容如下: with open('pi_digits.txt') as file_object: c 阅读全文

posted @ 2022-12-26 12:26 花阴偷移 阅读(92) 评论(0) 推荐(0)

python if语句 5

摘要: 1.条件测试 cars = ['audi', 'bmw', 'subaru', 'toyota'] for car in cars: if car=='bmw': print(car.upper()) else: print(car.title()) #下面检查不相等 != top='mus' if 阅读全文

posted @ 2022-12-26 12:25 花阴偷移 阅读(14) 评论(0) 推荐(0)

python 字典 6

摘要: 1. 字典增删改 #简单字典用法,用{}表示字典。键和值之间用冒号分隔,而键值对之间用逗号分隔,如下所示 alien_0={'color':'green','points':'5'} print(alien_0['color']) #字典是键值对,每个值可以是字符串,数字,列表,字典 #添加键值对 阅读全文

posted @ 2022-12-26 12:25 花阴偷移 阅读(22) 评论(0) 推荐(0)

python while 7

摘要: 1. 简单的while示例 current_number=1 while current_number<=5 : print(current_number) current_number+=1 2.使用标志 active=True num =1 num_end=10 while active: pr 阅读全文

posted @ 2022-12-26 12:24 花阴偷移 阅读(19) 评论(0) 推荐(0)

python 函数 9

摘要: 1.定义函数 #下面定义一个简单的函数, def关键字用来定义函数 def greet_user(username): print(f"hello-{username}") #调用 greet_user('jesse') #实参和形参,上面变量username是一个形参(parameter),gre 阅读全文

posted @ 2022-12-26 12:24 花阴偷移 阅读(26) 评论(0) 推荐(0)

python 类 10

摘要: 1.创建和使用类 #在python中,首字母大写的名称指的是类 class Dog: #定义方法,该方法是一个特殊方法,每当Dog类创建新实例时,python都会自动运行它 #这个方法的名称中,开头和末尾各有两个下划线,这是一种约定。 #self是必须的形参,指本身实例的引用 def __init_ 阅读全文

posted @ 2022-12-26 12:24 花阴偷移 阅读(7) 评论(0) 推荐(0)

python 的vs code配置

该文被密码保护。 阅读全文

posted @ 2022-12-26 12:23 花阴偷移 阅读(1) 评论(0) 推荐(0)

scrapy 安装报错 This package requires Rust >=1.48.0.

摘要: 在pip3 install scrapy==2.5.1 安装包时报错,提示:This package requires Rust >=1.48.0. 解决方案:更新pip3包,命令如下: pip3 install --upgrade pip 阅读全文

posted @ 2022-12-26 12:20 花阴偷移 阅读(3048) 评论(0) 推荐(0)

scrapy 监控可视化Grafana介绍与安装(2)

摘要: 一.概述 Grafana是一个用于监控和可观察性的开源平台。它提供了查询、可视化、提醒、和了解指标,它专注于时序类图表分析,而且支持多种数据源,如Prometheus、Graphite、InfluxDB、Elasticsearch、MySQL、Kubernetes、Zabbix等。 Grafana对 阅读全文

posted @ 2022-12-26 12:20 花阴偷移 阅读(76) 评论(0) 推荐(0)

Airtest介绍

该文被密码保护。 阅读全文

posted @ 2022-12-26 12:19 花阴偷移 阅读(0) 评论(0) 推荐(0)

上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 55 下一页

导航