pass background process to foreground in python
Posted: Tue Aug 01, 2017 12:11 am
hello this is a part of my code:
i start omxplayer in backgound to not watch the process in the tv.
I would like the end of the process to move to the foreground.
Does anyone know how to do it? thak you
Code: Select all
try:
if len(data1[1]) != 0:
loop = "sudo omxplayer --loop -o both --no-keys --blank --no-osd -s /media/pendrive/" + data1[1] + "&"
subprocess.Popen(stop.split())
sleep( 1 )
subprocess.Popen(loop.split())
sleep( 1 )
subprocess.Popen(hide.split())
sleep( 1 )
subprocess.Popen(pause.split())
sleep( 1 )
subprocess.Popen(rewind.split())
sleep( 1 )
I would like the end of the process to move to the foreground.
Does anyone know how to do it? thak you