I'm trying to open a file with spaces in path with subprocess.call function but I can't get it working.
import subprocess subprocess.call(['cmd','/c','start C:/Users/akg/Desktop/file 1.png']) I've tried also
import subprocess file= '"C:/Users/akg/Desktop/file 1.png"' subprocess.call(['cmd','/c','start '+file]) But I still getting this error
1st case :
, 2nd case
even spliting the command whenever there is a whitespace is not working