python3 linux 命令 文件名转义

#https://docs.python.org/3/library/shlex.html#shlex.quote
from shlex import quote
command = 'ls -l {}'.format(quote(filename))
原文地址:https://www.cnblogs.com/owlowl/p/15661642.html