def resolve_interpreter(exe):
    if os.path.abspath(exe) != exe:
        paths = os.environ.get('PATH', '').split(os.pathsep)
        for path in paths:
            if os.path.exists(os.path.join(path, exe)):
                exe = os.path.join(path, exe)
                break
    if not os.path.exists(exe):
        logger.fatal('The executable %s (from --python=%s) does not exist' % (exe, exe))
        sys.exit(3)
    return exe

############################################################
## Relocating the environment:
Check if the given class is specified in the deferred type registry.
dataset/ETHPy150Open ralfonso/theory/go-pylons.py/resolve_interpreter--crossover with--dataset/ETHPy150Open ipython/ipython-py3k/IPython/lib/pretty.py/RepresentationPrinter._in_deferred_types