o
    ÆiÂ  ã                   @   sˆ   d Z ddlZddlZddlZddlmZ ddlmZ ddd„Zde	e
eef  ddfd	d
„ZdededB fdd„ZedkrBeƒ  dS dS )a;  
Gather system information and version information for pydicom and auxiliary
modules.

The output is a GitHub-flavoured markdown table whose contents can help
diagnose any perceived bugs in pydicom. This can be pasted directly into a new
GitHub bug report.

This file is intended to be run as an executable module.
é    N)Ú
ModuleType)ÚcastÚreturnc               	   C   sp   dt   ¡ fdtjfg} d}|D ]"}zt |¡}W n ty#   d}Y nw t|ƒp)d}|  ||f¡ qt| ƒ d S )NÚplatformÚPython)ÚpydicomÚgdcmÚjpeg_lsÚnumpyÚPILÚ	pylibjpegÚopenjpegÚlibjpegz_module not found_z**cannot determine version**)	r   ÚsysÚversionÚ	importlibÚimport_moduleÚImportErrorÚextract_versionÚappendÚprint_table)Úversion_rowsÚmodulesÚmoduleÚmr   © r   úF/mnt/sdb/aimis/docanh/lib/python3.10/site-packages/pydicom/env_info.pyÚmain   s   
ÿr   r   c              	   C   sN   d}t | dd¡ƒ t | dd¡ƒ | D ]\}}t | || dd¡¡ƒ qd S )Nz
{:12} | {}r   r   z------z-------Ú
ú )ÚprintÚformatÚreplace)r   Ú
row_formatr   r   r   r   r   r   .   s   þr   r   c                 C   s6   | j dkrttd B t| dd ƒƒS ttd B t| dd ƒƒS )Nr   ÚGDCM_VERSIONÚ__version__)Ú__name__r   ÚstrÚgetattr)r   r   r   r   r   7   s   
r   Ú__main__)r   N)Ú__doc__r   r   r   Útypesr   Útypingr   r   ÚlistÚtupler'   r   r   r&   r   r   r   r   Ú<module>   s   
	
ÿ