I'm writing a script that saves an image file to the desktop (so "image.JPG"). After doing that, I want to open the image file so that it is displayed on the screen. I've been trying to use subprocess (which I have no experience with), but can't seem to get it to work.
import subprocess
subprocess.Popen("C:/Users/first.last/Desktop/image.JPG")
However, that results in the following error:
[error] OSError ( Cannot run program "C:/Users/sean.sheehan/Desktop/image.JPG" (in directory "C:\SikuliX"): CreateProcess error=193, %1 is not a valid Win32 application )
I'm assuming this is because it is a file rather than an application (maybe I have to open an application that allows you to view an image?)
So, is there a way to open an image file in sikuli/jython/python without having to double click it with sikuli? I'd also prefer not to download any additional packages.
Thanks.