![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
衬衫的价格是
九磅十五便士
展开
-
python 读取文件名并写入xlsx
# -*- coding: utf-8 -*-import osdef listdir(path, list_name): for file in os.listdir(path): file_path = os.path.join(path, file) if os.path.isdir(file_path): listdi...原创 2018-03-15 16:37:17 · 4304 阅读 · 0 评论 -
解决Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncExceptio
在使用安卓模拟器定位页面元素时启动uiautomatorviewer.bat ,但是报错: Error while obtaining UI hierarchy XML file: com.android.ddmlib.SyncExceptio解决办法:关闭appium原创 2018-06-01 16:31:20 · 19486 阅读 · 9 评论 -
Appium安装与初步使用
1,appium是什么?开源 跨平台 多语言支持 移动应用 自动化工具测试程序语言python Java ruby js php c#测试程序运行平台windows linux mac osiOS的应用,appium server必须应用在iOS机器上2,自动化原理3,安装3.1安装appium python client包pip install Appium-Python-Clien...原创 2018-06-01 15:30:33 · 7796 阅读 · 2 评论 -
win10 安装robotframework
1,安装python2.71.1下载安装包,下载好之后一路next。https://www.python.org/downloads/1.2 将python2.7 的路径加到环境变量里1.3 安装成功在命令行中输入python,出现下图则安装成功2,安装pip 进入python2.7的目录下scripts的文件夹命令行,输入命令easy_install pip,开始安装pip3,安装wxPytho...原创 2018-06-22 17:34:30 · 1869 阅读 · 0 评论 -
python随机漫步函数
rw.visual.pyimport matplotlib.pyplot as pltfrom random_walk import RandomWalk# 创建一个RandomWalk实例,并将其包含的点都绘制出来rw = RandomWalk(50000)po_numbers=list(range(rw.numpoints))rw.fill_walk()plt.scatter...原创 2018-04-26 14:56:03 · 478 阅读 · 0 评论 -
Python----if语句,字典
一,if语句1,if条件测试每条if语句的核心是一个true或false的表达式,这种表达式称为条件测试,如果结果为true,执行跟在后面的语句,如果为false则忽略这些代码。alien_color =['green','yellow','red']for color in alien_color: if color == 'green': print("玩家获得了5点") ...原创 2018-04-20 16:57:28 · 1385 阅读 · 0 评论 -
Python----操作列表,元组
一,列表1,遍历列表(使用for循环)list=['1','2','3','4','5','6']for i in list: print(i) 2,创建数值列表range()函数能生成一系列数字for values in range(1,7): print(values)range()函数创建列表list=list(range(1,7,1))print(list)3,列表切片遍历切片...原创 2018-04-20 14:51:39 · 167 阅读 · 0 评论 -
python----数据可视化--散点图
#-*- coding:utf-8 -*-import matplotlib.pyplot as pltx_values=list(range(1,1000))y_values=[x**2 for x in x_values]plt.scatter(x_values,y_values,c=y_values,cmap=plt.cm.Blues,edgecolors='none',s=40)...原创 2018-04-24 16:46:44 · 574 阅读 · 0 评论 -
python----数据可视化-折线图
import matplotlib.pyplot as pltdata=[1,2,3,4,5]squares=[1,4,9,16,25]plt.plot(data,squares,linewidth=5)#设置图表名称plt.title("Squares Number",fontsize=14)#设置x轴名称plt.xlabel("x",fontsize=10)#设置y轴名称p...原创 2018-04-24 15:16:04 · 566 阅读 · 0 评论 -
python----列表排序(由小到大)
#-*- coding:utf-8 -*-list=[3,56,54,67,88,999,556,1]def mySort(list): newList=[] for i in range(len(list)): number=min(list) newList.append(number) list.remove(number) re...原创 2018-04-23 15:30:55 · 14506 阅读 · 0 评论 -
简单的爬虫,爬取火狐主页的图片并保存到本地
#-*- coding:utf-8 -*-#encoding:utf8import urllib.requestimport reimport chardetdef getHtml(url): #html=urllib.request.urlopen(url).read() #charset=chardet.detect(html) #html=html.de...原创 2018-03-29 22:50:37 · 601 阅读 · 0 评论 -
selenium+python自动化提交表单
# -*- coding: utf-8 -*-from selenium import webdriverfrom selenium.webdriver.support.select import Selectimport loginimport timeimport unittestclass Pem: driver = webdriver.Firefox() driver....原创 2018-03-22 17:30:07 · 2148 阅读 · 0 评论 -
python接口自动化case requests+pymysql
源码:#-*- coding:utf-8 -*-import pymysqlimport requestsimport jsonimport unittestclass case_login(unittest.TestCase): def setUp(self): pass def connectdb(self): conn=pymysq...原创 2018-06-26 16:15:34 · 405 阅读 · 0 评论