Reputation: 145
I stumbled across shlex.quote()
. I have read explanations about what shlex.quote()
is, but I am wondering when to use it and when not. I see that I should use it when I am using Python as a subshell. For example, using os.system()
or subprocess.call()
or even using pexpect
. Should I use it when I am trying to check for a file using os.path.isfile
, or are there any other useful ways to use it properly?
Upvotes: 2
Views: 106