#!/usr/bin/python#-*- coding: utf-8 -*-#filename: paxel.py
'''It is a multi-thread downloading tool
It was developed follow axel.
Author: volans
E-mail: volansw [at] gmail.com'''
importsysimportosimporttimeimporturllibfrom threading importThread
local_proxies= {'http': 'http://131.139.58.200:8080'}classAxelPython(Thread, urllib.FancyURLopener):'''Multi-thread downloading class.
run() is a vitural method of Thread.'''
def __init__(self, threadname, url, filename, ranges=0, proxies={}):
Thread.__init__(self, name=threadname)
urllib.FancyURLopener.__init__(self, proxies)
self.name=threadname
self.url=url
self.filename=filename
self.ranges=ranges
self.downloaded=0defrun(self):'''vertual function in Thread'