elfresno
Posts: 44
Joined: Sun May 21, 2017 5:19 pm

Python does not execute continuous commands

Sun Jun 18, 2017 6:20 pm

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

User avatar
paddyg
Posts: 2541
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: Python does not execute continuous commands

Mon Jun 19, 2017 9:02 am

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.
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

Return to “Python”