上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页
摘要: atx-agent是运行在手机上的一个代理程序, 可以通过网络进行手机测试, 项目地址: https://github.com/openatx/atx-agent 通过阅读uiautomator2源码, 搞明白了判断的过程, 有如下心得: - 安装adbutils库, 建立Device对象, 下面的 阅读全文
posted @ 2023-07-01 20:43 顺其自然,道法自然 阅读(550) 评论(0) 推荐(0) 编辑
摘要: 使用python通过调试模式测试安卓手机APP, 使用uiautomator2库是比较方便的, 这个库的源码网址是: https://github.com/openatx/uiautomator2 通过阅读源码, 大概搞明白了其实现原理, 它是通过调用adbutils库, 进行转发重定向, 通过js 阅读全文
posted @ 2023-06-29 21:59 顺其自然,道法自然 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 在调试python源码时遇到一件奇怪的事情, 某个属性的值为`__iter__`, 并且给它明确的赋别的值, 发现并没有作用, 如下所示: ![image](https://img2023.cnblogs.com/blog/2300455/202306/2300455-202306291415474 阅读全文
posted @ 2023-06-29 14:29 顺其自然,道法自然 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 代码如下: ```python import types # 定义一个类 class MyClass: def original_method(self): # 原始的执行函数 print("原始的执行函数") # 创建类的实例 my_object = MyClass() # 定义新的执行函数 de 阅读全文
posted @ 2023-06-25 16:47 顺其自然,道法自然 阅读(236) 评论(0) 推荐(0) 编辑
摘要: GUID生成的ID太长, 不方便使用, 我想生成一个短的, 最好不要有特殊字符, 另外, 只在本机使用, 不跨网络, 所以我使用当前时间作为生成的ID, 为了使生成的ID更短一些, 对它进行重新编码; 另外, 为防止短时间内有重复的ID, 记录上次生成的ID并进行重复判断. 代码如下: ```pyt 阅读全文
posted @ 2023-06-25 11:14 顺其自然,道法自然 阅读(363) 评论(0) 推荐(0) 编辑
摘要: jsonpickle保存的文本有形如"\u6211\u7684"的字符, 看起来很不方便, 怎么转换为原始字符呢? 参考如下代码: ```python import jsonpickle # 定义一个包含Unicode编码字符的字符串 text = "我的名字是\u674e\u5b87\u5b87" 阅读全文
posted @ 2023-06-13 12:29 顺其自然,道法自然 阅读(0) 评论(0) 推荐(0) 编辑
摘要: python中经常要保存一些数据, json是一种理想的存储格式, 纯文本的, 也方便阅读, 但有时使用起来不太方便, 比如下面的例子: ```python a = jsonData['A'] b = jsonData['B'] ``` 只能按字典方式引用, 还不支持自动完成, 不如python对象 阅读全文
posted @ 2023-06-12 17:40 顺其自然,道法自然 阅读(283) 评论(0) 推荐(0) 编辑
摘要: 代码如下: ```python def create_shortcut(): #H.Read if os.name != 'nt': #H.Read sys.exit("Shortcut only available in Windows") #H.Read import pythoncom # p 阅读全文
posted @ 2023-06-06 11:27 顺其自然,道法自然 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 有一段python代码如下: ```python from win32com.shell import shell from win32com.shell import shellcon ``` 结果出现类型错误的提示: ![image](https://img2023.cnblogs.com/bl 阅读全文
posted @ 2023-06-05 22:25 顺其自然,道法自然 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 当前行的内容替换: ```typescript func.myRegisterCommand('codeStat.read',()=>{ const editor = vscode.window.activeTextEditor; if(editor undefined){return;}; con 阅读全文
posted @ 2023-06-05 19:34 顺其自然,道法自然 阅读(443) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 12 下一页