killing process in windows

Miki Tebeka miki.tebeka at zoran.com
Thu Jun 9 11:06:29 CEST 2005


Hello Veronica,

>    I am using Trent's process.py but I have a problem with killing the
>    processes in windows.
>    For example :
> 
>    import process,time
> 
>    p=process.ProcessOpen('C:\Program Files\Windows Media
>    Player\wmplayer')
>    time.sleep(3)
>    p.kill()
> 
>    will start Media Player without terminating it.
>    Any suggestions?
A brutal way will be to use win32process.TerminateProcess (from win32all
package - http://starship.python.net/crew/mhammond/).

HTH.
--
------------------------------------------------------------------------
Miki Tebeka <miki.tebeka at zoran.com>
http://tebeka.bizhat.com
The only difference between children and adults is the price of the toys
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 193 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050609/a3be95c9/attachment.sig>


More information about the Python-list mailing list