def is_local(path):
    if not running_under_virtualenv():
        return True
    return normalize_path(path).startswith(normalize_path(sys.prefix))
Passing invalid command - catch OSError
dataset/ETHPy150Open balanced/status.balancedpayments.com/venv/lib/python2.7/site-packages/pip-1.3.1-py2.7.egg/pip/util.py/is_local--crossover with--dataset/ETHPy150Open bloomberg/phabricator-tools/py/phl/phlsys_subprocess__t.py/PhlsysSubprocessTests.test_invalid_cmd