a
    ¢–BeÞ  ã                   @   sb   d dl Z d dlZd dlmZ ddlmZ ddlmZmZ dej	ej
f Zdd„ Zed	kr^eƒ  dS )
é    N)ÚQtCoreé   )ÚDriver)ÚNoSuchClassErrorÚNoSuchWidgetErrorz3Python User Interface Compiler %s for Qt version %sc               
   C   s  t jdtd�} | jddddddd	� | jd
dddddd� | jddddddd	� | jddddddd	� | jdddddddd d!� t j| d"d#�}|jd$d%d&d'd(� |jd)d*ddd+d	� |jd,d-dd.d/d0d1d!� |  |¡ |  ¡ \}}t|ƒd2k�rtj	 
d3¡ t d2¡ t||d4 ƒ}d2}z| ¡ }W nè t�yT } z| |¡ W Y d }~nÂd }~0  t�y‚ } z| |¡ W Y d }~n”d }~0  t�y° } z| |¡ W Y d }~nfd }~0  t�yÞ } z| |¡ W Y d }~n8d }~0  t�y } z| |¡ W Y d }~n
d }~0 0 t |¡ d S )5Nzpyuic5 [options] <ui-file>)ÚusageÚversionz-pz	--previewÚpreviewÚ
store_trueFz3show a preview of the UI instead of generating code)ÚdestÚactionÚdefaultÚhelpz-oz--outputÚoutputú-ÚFILEz.write generated code to FILE instead of stdout)r   r   Úmetavarr   z-xz	--executeÚexecutez1generate extra code to test and display the classz-dz--debugÚdebugzshow debug outputz-iz--indentÚindentÚstoreÚinté   ÚNz8set indent width to N spaces, tab if N is 0 [default: 4])r   r   Útyper   r   r   zCode generation options)Útitlez--import-fromZimport_fromZPACKAGEzSgenerate imports of pyrcc5 generated modules in the style 'from PACKAGE import ...')r   r   r   z--from-importsZfrom_importsz#the equivalent of '--import-from=.'z--resource-suffixZresource_suffixÚstringZ_rcZSUFFIXz>append SUFFIX to the basename of resource files [default: _rc]r   z+Error: one input ui-file must be specified
r   )ÚoptparseÚOptionParserÚVersionÚ
add_optionÚOptionGroupÚadd_option_groupÚ
parse_argsÚlenÚsysÚstderrÚwriteÚexitr   ZinvokeÚIOErrorZ
on_IOErrorÚSyntaxErrorZon_SyntaxErrorr   Zon_NoSuchClassErrorr   Zon_NoSuchWidgetErrorÚ	ExceptionZon_Exception)ÚparserÚgÚoptsÚargsÚdriverZexit_statusÚe© r2   úR/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/PyQt5/uic/pyuic.pyÚmain#   sj    ÿþþþÿþ
ÿ
ÿ
þ

 r4   Ú__main__)r%   r   ZPyQt5r   r0   r   Ú
exceptionsr   r   ZPYQT_VERSION_STRZQT_VERSION_STRr   r4   Ú__name__r2   r2   r2   r3   Ú<module>   s   <