Using a Python script, I want to be able to open an image and close it on ubuntu.
Looking at the answer here:
Specifically this line: viewer = subprocess.Popen(['some_viewer', infile])
What should I put as the 'some_viewer'?
|
Using a Python script, I want to be able to open an image and close it on ubuntu. Looking at the answer here: Specifically this line: viewer = subprocess.Popen(['some_viewer', infile]) What should I put as the 'some_viewer'? |
|||
|
You can use "gvfs-open" to launch the default application for the filetype. e.g. |
||||
|
|
viewer = subprocess.Popen(['display',infile]). – Vinit Kumar Jul 27 '12 at 8:14