Could Sikuli import wmi.py?

Asked by Julio

Hi!
I use Sikuli to do software test and it's really useful in some case~

Now i'd like to acquire test PC's information(CPU usage, memory...etc) during automating test, so i found there is a solution which is wmi of Python implementation (http://timgolden.me.uk/python/wmi/index.html).

I have downloaded the ZIP file with wmi.py and using Python import approach, but it will return "ImportError: No module named win32com" message. Is there any solution for this problem or for my requirement?

My test environment is:
Windows XP SP2
Sikuli X rc2

Many thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

As the doc tells you:

"The Python WMI module is a lightweight wrapper on top of the pywin32 extensions,"

so it needs the pywin32 module too.

But I guess, even if you make it available, you will not be able to use wmi, since I guess pywin32 is C-based. Such modules cannot be imported in the Sikuli/Jython environment.

You have to look for a solution, that is Jython compatible or something, that is totally written in Python.

Revision history for this message
Julio (julioliu) said :
#2

Thanks RaiMan, that solved my question.

Revision history for this message
Julio (julioliu) said :
#3

Yes, i think you are right~
it should be C-based, i will try to find other solution.
Anyway, thanks for your reply.