a
    Sic_  ã                   @   sP   d Z ddlZddlmZmZmZ ddlmZ edkr8dndZd	d
„ Z	dd„ Z
dS )z*
Compatibility module for high-level h5py
é    N)ÚfspathÚfsencodeÚfsdecodeé   )Úhdf5_built_version_tuple)é   é
   é   zutf-8Úmbcsc                 C   s4   t | ƒ} tjdkr,t| tƒr(|  td¡S | S t| ƒS )zÿ
    Encode filename for use in the HDF5 library.

    Due to how HDF5 handles filenames on different systems, this should be
    called on any filenames passed to the HDF5 library. See the documentation on
    filenames in h5py for more information.
    Úwin32Ústrict)r   ÚsysÚplatformÚ
isinstanceÚstrÚencodeÚWINDOWS_ENCODINGr   ©Úfilename© r   úK/var/www/html/django/DPS/env/lib/python3.9/site-packages/h5py/_hl/compat.pyÚfilename_encode   s    

r   c                 C   sH   t jdkr@t| tƒr |  td¡S t| tƒr.| S tdt| ƒj	 ƒ‚t
| ƒS )zú
    Decode filename used by HDF5 library.

    Due to how HDF5 handles filenames on different systems, this should be
    called on any filenames passed from the HDF5 library. See the documentation
    on filenames in h5py for more information.
    r   r   zexpect bytes or str, not %s)r   r   r   ÚbytesÚdecoder   r   Ú	TypeErrorÚtypeÚ__name__r   r   r   r   r   Úfilename_decode   s    


r   )Ú__doc__r   Úosr   r   r   Úversionr   r   r   r   r   r   r   r   Ú<module>   s   