Nov-28-2019, 02:09 PM
(Nov-27-2019, 09:07 PM)buran Wrote: if your string hasc:\temp
then \t is escape sequence (i.e. TAB). use forward slash, raw string or escape the backslash.
Also subprocess.run() is recommended over os.system
- Are there any problems with me first trying to use a variable with the below code?
- How would you modify/improve this specific code?
- Do I have alternatives?
- Should I try to replace each single backslash with two backslashes? How can I do this?
the_command = "a dot exe file with 3 options" subprocess.call (r'the_command, shell = True)