摘要:
1,find [PATH] [option] [acion] 查找命令 2,ls 展示文件夹内容 -a 全部文档,连同隐藏文档(以.开头的文档)一起列出来 3,cd 切换目录 4,tree 显示树形的层级目录结构,非原生命令,需要安装tree 5,cp 复制文件 6,rm 删除文件 7,mv 移动文件 8,pwd 查看当前工作目录的完整路径 9,tar 用于压缩解压 10,mkdir 创建目录(文 阅读全文
摘要:
# # 利用描述符原理定义一个@classmethod # class ClassMethod: # def __init__(self,func): # self.func = func # def __get__(self,instance, owner): # # 类来调用,instance为None,owner为类本身, # # 实例来调用,instance为实例,owner为类本身, # 阅读全文
摘要:
class StaticMethod: def __init__(self,func): self.func=func def __get__(self, instance, owner): #类来调用,instance为None,owner为类本身,实例来调用,instance为实例,owner为类本身, print("hhahaha") def feedback(*args,**kwargs) 阅读全文
摘要:
# 先回顾一下 class Room: def __init__(self,name,width,length): self.name = name self.width = width self.length = length @property def area(self): return self.width * self.length r1 = Room('wang',100,100) p 阅读全文