I see two possible corrections you could try. Firstly try calling the python module itself instead of the file name (like "py.mymod.search(N)" instead of "py.mymod.py").
Secondly, maybe your file isn't in the python search path. If it isn't, try adding your folder to the python sys path using:
if count(py.sys.path,'') == 0