why? [win32com/WMI]

rtilley rtilley at vt.edu
Wed Mar 1 19:21:44 CET 2006


Tim Golden wrote:
> [Sergey]
> 
> | import win32com.client
> | 
> | loc = win32com.client.Dispatch("WbemScripting.SWbemLocator")
> | svc = loc.ConnectServer("srv", "root/cimv2", "Admin at zzz.ru", "******")
> | sys = svc.get("Win32_Process")
> | sys.create("notepad.exe")
> | 
> | =>
> | 
> | Traceback (most recent call last):
> | File "remote.py", line 6, in ?
> | sys.create("notepad.exe")
> | TypeError: 'int' object is not callable 
> 
> I could explain (it's to do with the way in which
> WMI method calls are set up) but I suggest you look at
> this module <trumpet-blowing>:
> 
> http://timgolden.me.uk/python/wmi.html
> 
> which makes WMI much easier to work with.

I second that! Tim's WMI module works really well. Of course, you can do 
it however you like, but you should at least check out his WMI work. We 
use it with first class windows services, etc w/o problem.



More information about the Python-list mailing list