I am trying to display an image and then close the image viewer using python script that uses Pillow and PSUtil. It works fine on ubuntu, but it doesnot run on the latest osmc.
Can you please suggest/point out what I am doing wrong. Below is a small script that I ran on ubuntu.
#!/usr/bin/python
import time
import psutil
from PIL import Image
# open and show image
im = Image.open('test.png')
im.show()
# display image for 10 seconds
time.sleep(10)
# hide image
for proc in psutil.process_iter():
if proc.name() == "display":
proc.kill()