yasa
yasa

Reputation: 145

In which cases shlex.quote() is used?

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

Answers (0)

Related Questions