def download_file(self, url, filename, cwd=None):
        if not url:
            return
        def report_hook(index, blksize, size):
            if size <= 0:
                progression = '{0} bytes'.format(index * blksize)
            else:
                progression = '{0:.2f}%'.format(
                        index * blksize * 100. / float(size))
            stdout.write('- Download {}\r'.format(progression))
            stdout.flush()

        if cwd:
            filename = join(cwd, filename)
        if exists(filename):
            unlink(filename)

        print('Downloading {0}'.format(url))
        urlretrieve(url, filename, report_hook)
        return filename
Return the start token or tree.
dataset/ETHPy150Open kivy/kivy-ios/toolchain.py/Recipe.download_file--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/antlr3/antlr3/recognizers.py/RuleReturnScope.getStart