Page 1 of 1

Python does not execute continuous commands

Posted: Sun Jun 18, 2017 6:20 pm
by elfresno

Code: Select all

 if len(data1[1]) != 0:

                                subprocess.Popen(stop.split())
                                loop = "sudo omxplayer -o both --no-keys --blank --no-osd /media/pendrive/" + data1[1]
                                subprocess.Popen(loop.split())
                                subprocess.Popen(hide.split())
                                subprocess.Popen(pause.split())
                                subprocess.Popen(rewind.split())
hello i try with this part of code, and python no execute all of commands, only stop the video and play , but not hide the screen and pause. i try insert a time.wait (1) between the commands and work fine. but i see the video for 1 second.

Can someone tell me how to execute the orders continuously?

or start de video in pause in omxplayer?


thanks

Re: Python does not execute continuous commands

Posted: Mon Jun 19, 2017 9:02 am
by paddyg
I think you want to pipe the commands to the running subprocess (but may not really have understood what you are trying to do!) In which case you might be able to find examples from others trying to do the same thing.