Hello,
I can’t figure out how to send a string with double quote in a simple cmd command on Windows.
Here is my code :
params = [r"C:\Windows\System32\cmd.exe", 'echo "test"'] print(subprocess.list2cmdline(params)) p = subprocess.Popen(subprocess.list2cmdline(params))
In the console , it returns :
C:\Windows\System32\cmd.exe “echo “test””
Escaping the quotes with " returns the same result :
C:\Windows\System32\cmd.exe “echo “test””
Any idea ?
I tried everything =)