comparison data_manager/data_manager.py @ 3:bdd8632fa9fb draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_fetch_ncbi_taxonomy/ commit 1bcd553f81064957d5786302361675c29ed58a8d"
author iuc
date Mon, 06 Jul 2020 19:32:35 -0400
parents 4af4e175db0d
children d6acd5cd497b
comparison
equal deleted inserted replaced
2:4af4e175db0d 3:bdd8632fa9fb
3 import json 3 import json
4 import os 4 import os
5 import shutil 5 import shutil
6 import tarfile 6 import tarfile
7 import zipfile 7 import zipfile
8 try: 8 from urllib.request import Request, urlopen
9 # For Python 3.0 and later
10 from urllib.request import Request, urlopen
11 except ImportError:
12 # Fall back to Python 2 imports
13 from urllib2 import Request, urlopen
14 9
15 10
16 def url_download(url, workdir): 11 def url_download(url, workdir):
17 file_path = os.path.join(workdir, 'download.dat') 12 file_path = os.path.join(workdir, 'download.dat')
18 if not os.path.exists(workdir): 13 if not os.path.exists(workdir):