a
    BCCf                     @   sz   d Z ddlZzddlZW n ey.   dZY n0 edu s@edkrJddlZnddlmZ dddZdd	 Ze	d
krve  dS )z
Platform independent script to download all the
`scipy.datasets` module data files.
This doesn't require a full scipy build.

Run: python _download_all.py <download_dir>
    N    )	_registryc                 C   sR   t du rtd| du r"t d} tj D ] \}}t jtj| ||| d q,dS )a  
    Utility method to download all the dataset files
    for `scipy.datasets` module.

    Parameters
    ----------
    path : str, optional
        Directory path to download all the dataset files.
        If None, default to the system cache_dir detected by pooch.
    NzsMissing optional dependency 'pooch' required for scipy.datasets module. Please use pip or conda to install 'pooch'.
scipy-data)urlZ
known_hashfnamepath)poochImportErroros_cacher   registryitemsretrieveZregistry_urls)r   Zdataset_nameZdataset_hash r   X/var/www/html/django/DPS/env/lib/python3.9/site-packages/scipy/datasets/_download_all.pydownload_all   s    
r   c                  C   s<   t jdd} | jddttddd |  }t|j d S )NzDownload SciPy data files.)descriptionr   ?r   z.Directory path to download all the data files.)nargstypedefaulthelp)	argparseArgumentParseradd_argumentstrr	   r   
parse_argsr   r   )parserargsr   r   r   main/   s    
r   __main__)N)
__doc__r   r	   r
   __package__r   r   r   r   __name__r   r   r   r   <module>   s   


	