3
AAd]½  ã               @   s*   d dl mZ ddlmZ eddd„ƒZdS )	é    )Úcontextmanageré   )ÚH5Fileúr+c          
   k   s.   t | fd|i|—Ž}z
|V  W d|jƒ  X dS )aÇ  Context manager for reading an HDF5 file as an H5File object.

    Parameters
    ----------
    filename : str
        HDF5 file name.
    mode : str
        Mode to open the file:

        'r' : Read-only
        'w' : Write; create new file (an existing file would be deleted).
        'a' : Read and write to file; create if not existing
        'r+': Read and write to file; must already exist

    See `H5File` for additional keyword arguments.
    ÚmodeN)r   Úclose)Úfilenamer   ÚkwargsZh5© r
   úp/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.6/site-packages/apptools-4.4.0-py3.6.egg/apptools/io/h5/utils.pyÚopen_h5file   s    
r   N)r   )Ú
contextlibr   Úfiler   r   r
   r
   r
   r   Ú<module>   s   