This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: | |
# http://stackoverflow.com/questions/5783517/downloading-progress-bar-urllib2-python | |
import urllib2, sys | |
def chunk_report(bytes_so_far, chunk_size, total_size): | |
percent = float(bytes_so_far) / total_size | |
percent = round(percent*100, 2) | |
sys.stdout.write("Downloaded %d of %d bytes (%0.2f%%)\r" % | |
(bytes_so_far, total_size, percent)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.m | |
// views3 | |
// | |
// Created by Srihari Sridharan. | |
// Copyright (c) 2013 Srihari Sridharan. All rights reserved. | |
// | |
#import "ViewController.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.h | |
// views3 | |
// | |
// Created by Srihari Sridharan | |
// Copyright (c) 2013 Srihari Sridharan. All rights reserved. | |
// | |
#import <NinevehGL/NinevehGL.h> |