I want to view an image in Eye of Gnome (eog), and then have it automatically close later. I am not very well versed in subprocess, but so far I have tried:
eog = subprocess.Popen('oeg <some file>', shell=True)
# ...Code, Code, Code...
eog.kill()
or
eog.terminate()
Neither work. Any help?
Do not use shell=True
, example:
import subprocess, shlex
command = 'eog <filename'>
eog = subprocess.Popen(shlex(command))
..code..
eog.kill()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With