12 2016 档案

摘要:import unittest from appium import webdriver from appium.common.exceptions import NoSuchContextException import desired_capabilities class ContextSwitchingTests(unittest.TestCase): def setUp(s... 阅读全文
posted @ 2016-12-31 00:02 七月的尾巴_葵花 阅读(1135) 评论(0) 推荐(0) 编辑
摘要:import unittest from time import sleep from appium import webdriver import desired_capabilities class ChromeTests(unittest.TestCase): def setUp(self): desired_caps = { 'pl... 阅读全文
posted @ 2016-12-30 23:47 七月的尾巴_葵花 阅读(522) 评论(0) 推荐(0) 编辑
摘要:import dialog,e32,appuifw def ru(x):return x.decode('utf8') def qu(): appuifw.note(ru('已取消')) wait.close() wait=dialog.Wait(ru('载入中…'),True) wait.show() e32.ao_sleep(3) wait.close() pgr... 阅读全文
posted @ 2016-12-22 23:43 七月的尾巴_葵花 阅读(977) 评论(0) 推荐(0) 编辑
摘要:ru=lambda x:x.decode('u8') rp=lambda x:x.replace('\\','/') gb=lambda x:x.decode('gbk') class ZIP: def __init__(s): import zipfile,ntpath,listdir,appuifw s.ZF,s.NP,s.LD,s.A=zipfile.ZipFile,n... 阅读全文
posted @ 2016-12-22 23:37 七月的尾巴_葵花 阅读(386) 评论(0) 推荐(0) 编辑
摘要:其他常见的用途就是找到所有模式匹配的字符串并用不同的字符串来替换它们。sub() 方法提供一个替换值,可以是字符串或一个函数,和一个要被处理的字符串。 返回的字符串是在字符串中用 RE 最左边不重复的匹配来替换。如果模式没有发现,字符将被没有改变地返回。 可选参数 count 是模式匹配后替换的最大 阅读全文
posted @ 2016-12-22 23:34 七月的尾巴_葵花 阅读(390) 评论(0) 推荐(0) 编辑
摘要:RegexObject 的 split() 方法在 RE 匹配的地方将字符串分片,将返回列表。它同字符串的 split() 方法相似但提供更多的定界符;split()只支持空白符和固定字符串。就象你预料的那样,也有一个模块级的 re.split() 函数。 通过正则表达式将字符串分片。如果捕获括号在 阅读全文
posted @ 2016-12-09 01:14 七月的尾巴_葵花 阅读(552) 评论(0) 推荐(0) 编辑
摘要:#coding=utf-8 import MySQLdb conn = MySQLdb.connect(host='localhost',user='root',passwd='123456',charset='utf8') cursor = conn.cursor() try: #创建数据库 DB_NAME = 'test' cursor.execute('DR... 阅读全文
posted @ 2016-12-04 14:57 七月的尾巴_葵花 阅读(467) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-12-01 01:16 七月的尾巴_葵花 阅读(213) 评论(0) 推荐(0) 编辑