1

I have installed psutil module.
It works well if run by the python interpreter but when I try to import the module in a monkeyrunner script,it gives

No such module.

Is there any way through which i use psutil module in monkeyrunner?

Note-i am using the monkeyrunner with the android ics-x86 version

androidnewbie
  • 423
  • 2
  • 8
  • 15
  • What are you trying to achieve? psutil will find cpu, memory, etc. info about your host not your device. – Diego Torres Milano Sep 14 '12 at 03:03
  • Given a process id,i want to check whether the process is running or not (on the device).Actually i am playing a video using startactivity function(monkeyrunner),and i want to know when the playback ends(rather handle that event in my monkeyrunner script) – androidnewbie Sep 14 '12 at 11:33

1 Answers1

0

Try to name your script something.py. This way you have a python script where you can import the modules. When you run the script with monkeyrunner, some python modules are not recognized. Monkeyrunner does not equal python 100%. It does not have all the power and functionality.

Gabriel Porumb
  • 1,661
  • 1
  • 12
  • 21
  • so you mean there is no way using which i can import other modules not supported by monkeyrunner? Because there is a way using which you can install other python modules in jython. See this link- http://www.jython.org/jythonbook/en/1.0/appendixA.html#setuptools Since monkeyrunner uses jython can anything like that cant be done with monkeyrunner? – androidnewbie Sep 10 '12 at 12:17