- 论坛徽章:
- 0
|
试了下楼上说的,提示我sh.CommandNotFound: wmic,sh 模块里面没这个wmic?
wmic = wmi.WmiClientWrapper(
... username="Administrator",
... password="xxxx",
... host="xxx.xxx.xxx.xxx
... )
>>> output = wmic.query("SELECT * FROM Win32_Processor")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "wmi_client_wrapper/wrapper.py", line 92, in query
output = sh.wmic(*arguments)
File "/usr/local/lib/python2.6/site-packages/sh.py", line 2301, in __getattr__
return self.__env[name]
File "/usr/local/lib/python2.6/site-packages/sh.py", line 2232, in __getitem__
return Command._create(k, **self.baked_args)
File "/usr/local/lib/python2.6/site-packages/sh.py", line 776, in _create
raise CommandNotFound(program)
sh.CommandNotFound: wmic
|
|