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

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/m/n/mne-python-HEAD/mne/utils.py   mne-python(Download)
    try:
        # Checking file size and displaying it alongside the download url
        u = urllib.request.urlopen(url)
        try:
            file_size = int(u.headers['Content-Length'].strip())
        else:
            local_file = open(temp_file_name, "wb")
            data = urllib.request.urlopen(url)
            try:
                _chunk_read(data, local_file, initial_size=initial_size)

src/m/n/mne-python-HEAD/mne/tests/test_utils.py   mne-python(Download)
    # Skipping test if no internet connection available
    try:
        urllib.request.urlopen("http://github.com", timeout=2)
    except urllib.request.URLError:
        from nose.plugins.skip import SkipTest