-1

I'm using python on a Raspberry Pi to display an image slideshow with the program fim.

subprocess.call(["fim /home/pi/slates"], shell=True)

Once fim has opened the focus stays on fim, not python. There are keyboard commands in python that no longer respond.

How do I go back to python after fim has been opened? Is there a way to control fim through python if it's no longer in focus?

  • Possible duplicate of [How to start a background process in Python?](https://stackoverflow.com/questions/1196074/how-to-start-a-background-process-in-python) – tripleee Sep 18 '18 at 05:39

1 Answers1

1

subprocess.call() will block until the program called is complete.

If you want the called program to run in parallel, it would be better to use something like subprocess.Popen()

Kingsley
  • 14,398
  • 5
  • 31
  • 53