摘要: 1. 下载安装iTerm2 ( https://iterm2.com/ ) 2. 打开iTerm2,执行命令 /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" 3. 下载如下两 阅读全文
posted @ 2021-07-07 17:12 Mia妈妈加油呀 阅读(100) 评论(0) 推荐(0) 编辑
摘要: import os.path from win32com.client import Dispatch excel = Dispatch("ket.Application") # 启动wps excel 应用。Microsoft excel用Excel.Application excel.Visib 阅读全文
posted @ 2023-12-15 16:59 Mia妈妈加油呀 阅读(13) 评论(0) 推荐(0) 编辑
摘要: while(driver.execute_script("return document.readyState;") != "complete"): time.sleep(1) 阅读全文
posted @ 2023-09-28 15:49 Mia妈妈加油呀 阅读(37) 评论(0) 推荐(0) 编辑
摘要: def is_chinese(uchar): """判断一个unicode是否是汉字""" if uchar >= u'\u4e00' and uchar <= u'\u9fa5': return True else: return False def is_number(uchar): """判断 阅读全文
posted @ 2023-09-18 16:20 Mia妈妈加油呀 阅读(90) 评论(0) 推荐(0) 编辑
摘要: python——数据库操作PyMysql使用详解_南京丛林Jungle的博客-CSDN博客 阅读全文
posted @ 2023-07-06 16:48 Mia妈妈加油呀 阅读(4) 评论(0) 推荐(0) 编辑
摘要: 闭包。可以用来在一个函数,在一组私有变量之间,创建关联关系。在给定函数被调用的过程中,这些私有变量能够保持其持久性。(保存运行环境与变量的状态) func_list =[] for i in range(3): def deco(i): def myfunc(a): return i+a retur 阅读全文
posted @ 2023-07-05 14:38 Mia妈妈加油呀 阅读(4) 评论(0) 推荐(0) 编辑
摘要: from xpinyin import Pinyin def get_pinyin(str): p = Pinyin() return ''.join([i.capitalize() for i in p.get_pinyin(str).split('-')]) print(get_pinyin(' 阅读全文
posted @ 2023-04-03 11:35 Mia妈妈加油呀 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 鸭子类型 不用实现父类,只需要实现多个类,且多个类中实现了同一个方法(同名)。只关注方法名,不关注方法的实现方式。这种机制被称为鸭子类型。通过这个类型也可以实现多态。 案例: 比如list 和 set(), 他们都实现了iter(),所以实际都属于同一个类型:可迭代类型。 阅读全文
posted @ 2023-02-20 14:26 Mia妈妈加油呀 阅读(13) 评论(0) 推荐(0) 编辑
摘要: type创建了类 所有的类都继承自object python常见内置类型: 阅读全文
posted @ 2023-02-10 14:02 Mia妈妈加油呀 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 1. 函数可以被赋值 2. 类可以被赋值 3. 对象可以传递给列表 4. 函数当成返回值 阅读全文
posted @ 2023-02-10 10:00 Mia妈妈加油呀 阅读(68) 评论(0) 推荐(0) 编辑
摘要: python之sys.path介绍 - 海_纳百川 - 博客园 (cnblogs.com) 阅读全文
posted @ 2022-11-18 17:18 Mia妈妈加油呀 阅读(12) 评论(0) 推荐(0) 编辑