
    !hiA                     ^    d dl Z d dlZ	 d dlmZ d Zedk(  r e        yy# e$ r d ZY w xY w)    N)autocompletec                      y )N )parsers    SC:\des-py\Monitor\venv\Lib\site-packages\PyInstaller/utils/cliutils/grab_version.pyr   r      s        c                     t        j                  d      } | j                  ddd       | j                  ddd	d
d       t        |        | j	                         }	 ddlm} |j                  |j                        }|st        d      t        j                  |j                  dd      5 }|j                  t        |             d d d        t        d|j                         y # 1 sw Y   "xY w# t         $ r t        d      w xY w)NzThe printed output may be saved to a file, edited and used as the input for a version resource on any of the executable targets in a PyInstaller .spec file.)epilogexe_filezexe-filez%full pathname of a Windows executable)metavarhelpout_filenamezout-filename?zfile_version_info.txtz5filename where the grabbed version info will be saved)r   nargsdefaultr   r   )versioninfoz,ERROR: VersionInfo resource not found in exewzutf-8zVersion info written to: zAborted by user request.)argparseArgumentParseradd_argumentr   
parse_argsPyInstaller.utils.win32r   !read_version_info_from_executabler   
SystemExitcodecsopenr   writestrprintKeyboardInterrupt)r   argsr   infofps        r   runr$      s   $$BF 4  
 'D   D	57<<T]]KKLL[[**C9 	 RHHSY	 )$*;*;)>?@	  	   53445s%   AC4 ,C( C4 (C1-C4 4D	__main__)r   r   argcompleter   ImportErrorr$   __name__r   r   r   <module>r)      sF     ( 5F zE S  s   ! ,,