[python-win32] killProcName kinda slow

Mark Hammond mhammond at skippinet.com.au
Thu Oct 19 00:40:11 CEST 2006


> I am trying to use the killProcName function in a project, and it does
> work, but it is kinda slow.
>
> Just running it alone has the same effect
>
>
> C:\>killProcName.py notepad
> (wait for about 30 seconds)
> Killed notepad
>
>
> Is there any way to do this faster?  Or is there another function I
> should be calling?

I tend to use pskill.exe from the sysinternals site.  The problem with
killProcName is that it uses the Performance Monitor API to locate the PID
for a process, and this is slow.

Mark



More information about the Python-win32 mailing list