Python:文字列をshellの引数で使えるようにエスケープする
凡例
import shlex
shlex.quote(文字列)
※shellに渡す個々の引数に対して実行する必要がある
参考
shlex — 単純な字句解析
https://docs.python.org/ja/3/library/shlex.html#shlex.quote
import shlex
shlex.quote(文字列)
※shellに渡す個々の引数に対して実行する必要がある
shlex — 単純な字句解析
https://docs.python.org/ja/3/library/shlex.html#shlex.quote
©2025 森羅万象テーブル