
    tKg                         d Z ddlZ	 ddlZeedk(  rddlZnddlmZ d	dZd Ze	dk(  r e        yy# e$ r dZY 0w xY w)
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                     t         t        d      | t        j                  d      } t        j                  j                         D ]/  \  }}t        j                  t        j                  |   |||        1 y)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)url
known_hashfnamepath)poochImportErroros_cacher   registryitemsretrieveregistry_urls)r   dataset_namedataset_hashs      `/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/scipy/datasets/_download_all.pydownload_allr      sp     } 6 7 	7 |~~l+&/&8&8&>&>&@"l922<@".)	6 'A    c                      t        j                  d      } | j                  ddt        t	        j
                  d      d       | j                         }t        |j                         y )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argss     r   mainr&   /   sX    $$1MNF
c %| <M  O Dr   __main__)N)
__doc__r   r   r   __package__r   r   r   r&   __name__ r   r   <module>r,      sc    
 ++ 6. zF Y  Es   3 ==