python3 linux 命令 文件名转义

#https://docs.python.org/3/library/shlex.html#shlex.quote
from shlex import quote
command = 'ls -l {}'.format(quote(filename))
posted @ 2021-12-08 15:05  singyoutosleep  阅读(148)  评论(0编辑  收藏  举报