def _get_module_path(name, fail=False, install_path=None):
import imp<EOL>module = imp.find_module(name)<EOL>if not module and fail:<EOL><INDENT>raise RuntimeError("<STR_LIT>" + name + "<STR_LIT:'>")<EOL><DEDENT>path = module[<NUM_LIT:1>]<EOL>if not path and fail:<EOL><INDENT>raise RuntimeError("<STR_LIT>" + name + "<STR_LIT>")<EOL><DEDENT>if install_path:<EOL><INDENT>return os.path.join(install_path, os.path.split(path)[<NUM_LIT:1>])<EOL><DEDENT>return path<EOL>
Find the path to the jpy jni modules.