python执行shell脚本的几种方法
摘要:一、os.system(“command”) 这是python自带的执行shell命令的方法,其中最后一个0是这个命令的返回值,为0表示命令执行成功。但是使用system()无法将执行的结果保存起来。 import os print(os.system("touch a.txt")) 它也会返回一个
阅读全文
Proxy-Reflect详解
摘要:1.监听对象属性的操作(Es5) const obj = { name: "why", age: 18, height: 1.88 } // 需求: 监听对象属性的所有操作 // 监听属性的操作 // 1.针对一个属性 // let _name = obj.name // Object.define
阅读全文