python3 html转义
from xml.sax.saxutils import escape
from xml.sax.saxutils import quoteattr
escape("<这里是需要转译成html格式的代码>")
quoteattr('<这是要转义回的>')
使用 os 模块
判断文件是否存在
1
os.path.isfile(path)
判断目录是否存在
1
os.path.isdir(path)
判断路径是否存在
1
2...