Skip to main content
removed semicolons. Python doesn't require that.
Source Link
MrValdez
  • 8.7k
  • 11
  • 58
  • 79

I suspect it's the same problem as when you use shortcuts in Windows... Try this:

import os;os
os.system("\"C:\\Temp\\a b c\\Notepad.exe\" C:\\test.txt");

I suspect it's the same problem as when you use shortcuts in Windows... Try this:

import os;
os.system("\"C:\\Temp\\a b c\\Notepad.exe\" C:\\test.txt");

I suspect it's the same problem as when you use shortcuts in Windows... Try this:

import os
os.system("\"C:\\Temp\\a b c\\Notepad.exe\" C:\\test.txt")
added 2 characters in body
Source Link
Matthew Scharley
  • 133.4k
  • 55
  • 199
  • 225

I suspect it's the same problem as when you use shortcuts in Windows... Try this:

import os;
os.system("'C"\"C:\\Temp\\a b c\\Notepad.exe'exe\" C:\\test.txt");

I suspect it's the same problem as when you use shortcuts in Windows... Try this:

import os;
os.system("'C:\\Temp\\a b c\\Notepad.exe' C:\\test.txt");

I suspect it's the same problem as when you use shortcuts in Windows... Try this:

import os;
os.system("\"C:\\Temp\\a b c\\Notepad.exe\" C:\\test.txt");
Source Link
Matthew Scharley
  • 133.4k
  • 55
  • 199
  • 225

I suspect it's the same problem as when you use shortcuts in Windows... Try this:

import os;
os.system("'C:\\Temp\\a b c\\Notepad.exe' C:\\test.txt");