download.py python2 compatibility