B
    -,c                 @   s:   d Z ddlmZmZmZmZ ddlZddlZdddZdS )z
command_line
------------

Module for functions used as command line entry points.

The names of the corresponding command line scripts can be found in the
``entry_points`` section of ``setup.py``.

    )absolute_importdivisionprint_functionunicode_literalsNc          
   C   s~   | dkr2t jdd}|jdddd | }|j} xF| D ]>}tj|ddd	$}td
||d |j	|d W dQ R X q8W dS )a|  
    Print the MRC header contents from a list of files.
    
    This function opens files in permissive mode to allow headers of invalid
    files to be examined.
    
    Args:
        names: A list of file names. If not given or :data:`None`, the names
            are taken from the command line arguments.
        print_file: The output text stream to use for printing the headers.
            This is passed directly to the ``print_file`` argument of
            :meth:`~mrcfile.mrcobject.MrcObject.print_header`. The default is
            :data:`None`, which means output will be printed to
            :data:`sys.stdout`.
    Nz3Print the MRC header contents from a list of files.)descriptionfilename*zInput MRC file)nargshelpT)Z
permissiveZheader_onlyzMRC header for {}:)file)
print_file)
argparseArgumentParseradd_argument
parse_argsr   mrcfileopenprintformatZprint_header)namesr   parserargsnameZmrc r   3lib/python3.7/site-packages/mrcfile/command_line.pyprint_headers   s    
r   )NN)	__doc__Z
__future__r   r   r   r   r   r   r   r   r   r   r   <module>   s   