In which cases shlex.quote() is used?

95 Views Asked by At

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?

0

There are 0 best solutions below