Tricky problem: loss of terminal control after python script running (depending on internal parameters)

Mathieu Prevot mathieu.prevot at
Tue Jul 8 17:09:16 CEST 2008

Hi there,

I have a python script that runs subprocesses (task =  ffmpeg for
convertion of videos to images) from threads [1]. I want to run at
most 4 (default) tasks at the same time, and I usually ask the python
script to process 10 files for testing. I'll run it on thousands of
files for primetime.
It seems that when I ask to process < 4 files everything is ok, but if
I ask for > 4 files to process, I loose terminal features (no more
newlines, etc).
What's happening ? What is wrong in my script ?


            ,--  thread -- subprocess
script --|-- thread -- subprocess
            |--  thread -- subprocess
            '--  thread -- subprocess
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/octet-stream
Size: 1279 bytes
Desc: not available
URL: <>

More information about the Python-list mailing list