2021年1月27日
摘要: Image模块Image模块是在Python PIL图像处理中常见的模块,对图像进行基础操作的功能基本都包含于此模块内。如open、save、conver、show…等功能。 Image模块 Image模块是在Python PIL图像处理中常见的模块,对图像进行基础操作的功能基本都包含于此模块内。如 阅读全文
posted @ 2021-01-27 02:09 VincentAdamNemessis 阅读(291) 评论(0) 推荐(0) 编辑
  2021年1月23日
摘要: String提供的方法是完全匹配引入正则表达式:模糊匹配就其本质而言,正则表达式(或 RE)是一种小型的、高度专业化的编程语言,(在Python中)它内嵌在Python中,并通过 re 模块实现。正则表达式模式被编译成一系列的字节码,然后由用 C 编写的匹配引擎执行。 字符匹配(普通字符,元字符): 阅读全文
posted @ 2021-01-23 19:07 VincentAdamNemessis 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 定义类并执行类中的方法: class 类名: def 方法名(self,arg): print(arg) 中间人 = 类名() 中间人.方法名(1) 1 如何创建类 class 类名: pass 2 创建方法 构造方法 __init__ obj = 类('a1') 普通方法 obj = 类('xxx 阅读全文
posted @ 2021-01-23 19:06 VincentAdamNemessis 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 1 Python : 函数式 + 面向对象 2 函数式可以做所有的事情,但是否合适? 3 实例 小姑娘,劳动部门,的房间爱的告白呢 小姑娘,劳动部门,的房间爱的告白呢 小姑娘,劳动部门,的房间爱的告白呢 小姑娘,劳动部门,的房间爱的告白呢 小姑娘,劳动部门,的房间爱的告白呢 小姑娘,劳动部门,的房间 阅读全文
posted @ 2021-01-23 19:06 VincentAdamNemessis 阅读(44) 评论(0) 推荐(0) 编辑
摘要: # 别人的应用程序,或web框架 class RequestHandler: def get(self,arg): print('为所欲为') class BaseRequestHandler(RequestHandler): def get(self,arg): print('...') obj. 阅读全文
posted @ 2021-01-23 19:01 VincentAdamNemessis 阅读(69) 评论(0) 推荐(0) 编辑
摘要: py3: str bytes str: unicode bytes: 十六进制 str>>>>>>>bytes:编码 bytes>>>>>str:解码 python在读取文件时出现 'gbk' codec can't decode byte 0x89 in position 68: illegal 阅读全文
posted @ 2021-01-23 19:00 VincentAdamNemessis 阅读(86) 评论(0) 推荐(0) 编辑
摘要: SOCK_STREAM:TCP SOCK_Dgram: UDP family = AF_INET : 服务器之间的通信 family = AF_INET6 : 服务器间的通信 family = AF_UNIX : Unix 不同进程之间通信 client:sk <socket.socket fd = 阅读全文
posted @ 2021-01-23 18:59 VincentAdamNemessis 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 一 成员修饰符 公有成员 私有成员, 字段名 - 无法直接访问,只能间接访问 class Foo: def __init__(self,name,age): self.name = name self.age = age self.__age = age def __str(self,name): 阅读全文
posted @ 2021-01-23 18:59 VincentAdamNemessis 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 能设身于他人处境的人,能了解他们心理活动的人是不必为他们的前途顾虑的。 Watching Feeling By VincentAdamNemessis 对别人不感兴趣的人遭到的困难最大,对别人造成的损害也最大。人类所有的失败,都在这些人身上发生。 Watching Feeling By Vincen 阅读全文
posted @ 2021-01-23 18:54 VincentAdamNemessis 阅读(84) 评论(0) 推荐(0) 编辑
  2021年1月22日
摘要: 前面的*,+,?等都是贪婪匹配,也就是尽可能匹配,后面加?号使其变成惰性匹配 ret=re.findall('abc*?','abcccccc') print(ret)#['ab'] From WizNote 阅读全文
posted @ 2021-01-22 03:20 VincentAdamNemessis 阅读(42) 评论(0) 推荐(0) 编辑