The escape character for python to invoke the shell command?

python calls the shell command, where grep-v does not match the comment line that begins with / /, but two more backslashes are added during the python run. Please take a look at it. clipboard.png

Mar.11,2021
The p of

pdb prints out the "definition string" of this string, so it's right here. One slash becomes two slashes, no problem. If there is a problem with your command execution, you can check your popen-related code below. It is usually better not to use os.popen, and subprocess.popen.


Yes, there is a problem with the execution result. The original intention here is obviously that if this line is a / / comment line, it will not be grep, but the line that starts with / / will still be grep

.
Menu