I\'m writing a Python script that accepts file paths as strings, parses them, appends a command name, and builds a list, which is then passed to subprocess.Popen()
subprocess.Popen()
You can create a raw string by prepending r to the string literal notation
r"hello\nworld"
becomes
"hello\\nworld"
You can read some more here