environment/lib/python2.7/site-packages/IPython/utils/_process_win32.py
def _find_cmd(cmd):
    """Find the full path to a .bat or .exe using the win32api module."""
    try:
        from win32api import SearchPath
    except ImportError:
        raise ImportError('you need to have pywin32 installed for this to work')
    else:
        PATH = os.environ['PATH']
        extensions = ['.exe', '.com', '.bat', '.py']
        path = None
        for ext in extensions:
            try:
                path = SearchPath(PATH, cmd + ext)[0]
            except:
                pass
        if path is None:
            raise OSError("command %r not found" % cmd)
        else:
            return path
def _find_cmd(cmd):
    """Find the full path to a .bat or .exe using the win32api module."""
    try:
        from win32api import SearchPath
    except ImportError:
        raise ImportError('you need to have pywin32 installed for this to work')
    else:
        PATH = os.environ['PATH']
        extensions = ['.exe', '.com', '.bat', '.py']
        path = None
        for ext in extensions:
            try:
                path = SearchPath(PATH, cmd + ext)[0]
            except:
                pass
        if path is None:
            raise OSError("command %r not found" % cmd)
        else:
            return path
def _find_cmd ( cmd ) : try : from win32api import SearchPath except ImportError : raise ImportError ( 'you need to have pywin32 installed for this to work' ) else : PATH = os . environ [ 'PATH' ] extensions = [ '.exe' , '.com' , '.bat' , '.py' ] path = None for ext in extensions : try : path = SearchPath ( PATH , cmd + ext ) [ 0 ] except : pass if path is None : raise OSError ( "command %r not found" % cmd ) else : return path
Find the full path to a .bat or .exe using the win32api module.
Find the full path to a . bat or . exe using the win32api module .