Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
Test whether a path exists.  Returns False for broken symbolic links

        def exists(path):
    """Test whether a path exists.  Returns False for broken symbolic links"""
    try:
        os.stat(path)
    except os.error:
        return False
    return True
        


src/d/e/devpi-server-1.2.2/test_devpi_server/test_devpibootstrap.py   devpi-server(Download)
    monkeypatch.setitem(bootstrapdict, "urlretrieve", urlretrieve)
    virtualenv_script = get_virtualenv(vurl)
    assert py.std.os.path.exists(virtualenv_script)
    # check that a second attempt won't hit the web
    monkeypatch.setitem(bootstrapdict, "wget", None)
    virtualenv_script = get_virtualenv(vurl)
    assert py.std.os.path.exists(virtualenv_script)