摘要: 最近因为工作需要,需要在linux上去执行python代码,但是在执行的时候提示cannot import name request,我以为是导入有问题,然后我就把代码放到与包一个目录下,执行py问题提示语法错误,request.py文件里的代码有语法错误,我就纳闷了,不应该啊, 网上找资料一直没找 阅读全文
posted @ 2018-04-05 21:33 萱娃 阅读(996) 评论(0) 推荐(0) 编辑
摘要: 环境是python3.6+selenium 3.4.3+chrome64 在编写前端自动化脚本时使用implicitly_wait时不起作用 1、确认自己是否正确使用,可用简单的例子来测试,比如: 此例子是正常情况 def test(): driver.implicitly_wait(10) dri 阅读全文
posted @ 2018-02-24 15:30 萱娃 阅读(1513) 评论(0) 推荐(0) 编辑
摘要: a=[i for i in range(1,10) if i%2==0]print(a)c=[(x,y) for x in range(5) if x%2==0 for y in range(5) if y%2==1]print(c) M=[[1,2,3],[4,5,6],[7,8,9]]N=[[2 阅读全文
posted @ 2018-02-23 16:08 萱娃 阅读(226) 评论(0) 推荐(0) 编辑
摘要: def list_test(a): list1=[] def list_all_dict(a): #检测字段类型 if isinstance(a,dict): for x in range(len(a)): temp_key=list(a.keys())[x] temp_value=a[temp_k 阅读全文
posted @ 2018-02-22 17:38 萱娃 阅读(573) 评论(0) 推荐(0) 编辑
摘要: from xlrd import open_workbookfrom xlutils.copy import copy jsonfile=r'C:\Users\Administrator\Desktop\en.json'jsonread=open(jsonfile,'r',encoding='UTF 阅读全文
posted @ 2018-02-09 13:49 萱娃 阅读(225) 评论(0) 推荐(0) 编辑
摘要: 1、使用document.getByClassName时无click事件,然后就不知道怎么办了,也不太懂前端,与开发大哥确认,div 中class实现展开和收起是通过隐藏和显示这种方式实现的,在编写时需要写成如下 子菜单展开: document.getElementById('0$Menu').st 阅读全文
posted @ 2018-01-24 15:49 萱娃 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 常用命令 df [选项] [文件] -a 显示全部文件系统 -h 方便阅读方式显示 -l 只显示本地文件系统 -T 显示文件系统类型 fdisk /dev/sda1 阅读全文
posted @ 2017-10-11 16:09 萱娃 阅读(246) 评论(0) 推荐(0) 编辑
摘要: 常用命令 描述 旧命令 新命令 使服务自动启动 chkconfig --level 3 http on systemctl enable 服务名.service systemctl enable httpd.service 使服务不自动启动 chkconfig --level 3httpd off 阅读全文
posted @ 2017-10-11 14:31 萱娃 阅读(3896) 评论(0) 推荐(0) 编辑
摘要: 1、查看系统有几个内核 a、进入grub2.cfg文件中进行查看 b、通过grub界面查看 3、设置默认启动内核 阅读全文
posted @ 2017-10-11 10:37 萱娃 阅读(2025) 评论(0) 推荐(0) 编辑
摘要: 1、启动linux,进入grub,就是选择系统界面,选中系统按e进入编辑界面 2、找到linux16那一行,在末尾加上init=/bin/sh、按Ctrl+x,使用单用户模式启动4、mount -o remount,rw /5、重置密码passwd root6、touch /.autorelabel 阅读全文
posted @ 2017-10-11 09:53 萱娃 阅读(433) 评论(0) 推荐(0) 编辑