How does Python (or MonkeyRunner) locate imported modules?

For your reference, the android SDK does appear to have a bug in it where the first item on sys.path is the monkeyRunner lib and the working directory mashed together. I added the following to fix.

import sys
sys.path.append(sys.path[0].split(':',1)[1])
import util

You need to add the module to the search path (you are cwd is not in the same dir?)

http://docs.python.org/2/tutorial/modules.html

import sys sys.path.append('/path/to/your/module')

The directory where the script is located is automatically added to sys.path by monkeyrunner (and this works pretty well for other OSs, unfortunately it seems you are using one where it doesn't). Then other modules present in the same directory of the script can be imported without problems.

That is, screenshots.py should find utils.py because the directory functional-tests is in sys.path.

You can verify its content by doing

import sys
print sys.path
import util

in screenshots.py. My guess is that all those c:\ are messing with the path.