How to stop a linux process

Simon Brunning simon at brunningonline.net
Mon Nov 28 14:29:26 EST 2005


On 11/28/05, Glen <stygian at tesco.net> wrote:
> When I used the following line to play a midi file in linux,
>
> return_value = os.system('timidity test.mid')
>
> I have encountered two problems.
> 1. The python script halts until timidity has finished.
> 2. If I had control of the script, I can't think how I would stop timidity.
>
> Any advice on the 'area' of python I should be looking at would be greatly
> appreciated.

The subprocess module might be worth a look.

--
Cheers,
Simon B,
simon at brunningonline.net,
http://www.brunningonline.net/simon/blog/



More information about the Python-list mailing list