上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: 0,0 X increases --> + + | | Y increases | | | | 1920 x 1080 screen | | | | V | | | | + + 1919, 1079 屏幕分辨率大小由size()函数返回为两个整数的元组。position()函数返回鼠标光标的当前X和 阅读全文
posted @ 2019-04-29 11:47 Gex 阅读(3484) 评论(0) 推荐(0) 编辑
摘要: PyAutoGUI 可实现控制鼠标、键盘、消息框、截图、定位等功能,最近做了个自动化需要这些,故了解并记录下 自动化需要操作win7上的一个app,用PyAutoGUI做的,定位坐标,点击鼠标等,但是对于屏幕的大小分辨率有要求, 不够完善,后利用图片定位一个base坐标,根据base坐标定位其他按钮 阅读全文
posted @ 2019-04-29 11:19 Gex 阅读(4563) 评论(0) 推荐(0) 编辑
摘要: Python2 #-*- coding:utf-8 -*- import string #导入string这个模块 print string.digits #输出包含数字0~9的字符串 print string.letters #包含所有字母(大写或小写)的字符串 print string.lowe 阅读全文
posted @ 2018-11-30 11:59 Gex 阅读(5702) 评论(0) 推荐(1) 编辑
摘要: print(your_list.index('your_item')) #your_list为列表名称 your_item为需要修该的数据 阅读全文
posted @ 2018-09-26 11:00 Gex 阅读(2341) 评论(0) 推荐(1) 编辑
摘要: python模块: xlrd:读取excel xlwt:写入excel 缺点:excel格式无法复用 推荐xlutils模块 可复制原excel格式 from xlutils.copy import copy 2. 获取复制excel的sheet页 rb = xlrd.open_workbook(g 阅读全文
posted @ 2018-09-20 15:11 Gex 阅读(9642) 评论(0) 推荐(0) 编辑
摘要: 一、安装 ♦ python官网下载https://pypi.python.org/pypi/xlwt模块安装。 ♦或者在cmd窗口 pip install xlrd 二、使用 1.导入模块 import xlwt 2.例子 #!/usr/bin/python #coding=utf-8 # # # 阅读全文
posted @ 2018-09-20 14:56 Gex 阅读(1887) 评论(0) 推荐(0) 编辑
摘要: 一、安装 ♦ python官网下载http://pypi.python.org/pypi/xlrd模块安装。 ♦或者在cmd窗口 pip install xlrd 二、使用 1.导入模块: import xlrd 2.打开Excel workbook = xlrd.open_workbook(fil 阅读全文
posted @ 2018-09-20 14:35 Gex 阅读(396) 评论(0) 推荐(0) 编辑
摘要: import datetime print(datetime.datetime.now()) 以上代码实现输出系统当前时间,是引入整个datetime包,然后再调用datetime这个类中的now()方法。 以上代码实现功能也可以用以下代码实现: from datetime import datet 阅读全文
posted @ 2018-09-20 11:32 Gex 阅读(169) 评论(0) 推荐(0) 编辑
摘要: sys 模块常见函数 sys.argv #命令行参数List,第一个元素是程序本身路径 sys.exit(n) #退出程序,正常退出时exit(0) sys.version #获取Python解释程序的版本信息 sys.maxint #最大的Int值 sys.path #返回模块的搜索路径,初始化时 阅读全文
posted @ 2018-04-17 15:53 Gex 阅读(163) 评论(0) 推荐(0) 编辑
摘要: shell 脚本中 `dirname $0` 在命令行状态下单纯的执行时没有意义的,因为他返回当前路径的“.”。 在脚本中他返回这个脚本文件放置的目录,并可以根据这个目录来定位所要运行的程序的相对位置 $@:表示所有脚本参数的内容 $#:表示返回所有脚本参数的个数。 #! /bin/bash PWD 阅读全文
posted @ 2018-04-17 14:58 Gex 阅读(173) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 下一页