comparison data_manager/data_manager.py @ 4:cef5c909ccb8 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_fetch_ncbi_taxonomy/ commit 79946a95eb9a4c98fde04fa2cb3bc6a31a28e407"
author iuc
date Tue, 07 Jul 2020 00:05:59 +0000
parents f7b443a73374
children eaca3e270bf6
comparison
equal deleted inserted replaced
3:f7b443a73374 4:cef5c909ccb8
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 from urllib.request import Request, urlopen 8 try:
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
9 14
10 15
11 def url_download(url, workdir): 16 def url_download(url, workdir):
12 file_path = os.path.join(workdir, 'download.dat') 17 file_path = os.path.join(workdir, 'download.dat')
13 if not os.path.exists(workdir): 18 if not os.path.exists(workdir):