"get_process_ids" method of twapi package working on tkcon but not working on tclsh

Posted by shyam singh on 2007-04-20 03:59

I have tried below command on both tkcon & tclsh, its working with tkcon but not with tclsh. Can any one help it out.

package req twapi

#it will return the pid of the cmd.exe

set processId [get_process_ids -name "cmd.exe"]

Thanks in Advance

ActiveState Staff
Thu, 2007-08-09 10:54

The only difference between tkcon and regular tclsh is that tkcon (running with Tk) will already have an event loop. If twapi requires this to get the response (which seems odd), then an 'update' in tclsh should work.