
    Coi/                        d Z ddlZddlZdej                  d<   	 ddlZej
                  j                  Zej                  d       ej                  d       ej                  dk(  ra	 ddl
Z
 e
j                  ej                  j                  dd      e_         e
j                  ej                  j                  dd      e_        d	 Zd
 Zd Zd Zd Zd Zd Zy#  Y xY w#  Y !xY w)u9   
控制台输出辅助模块 - 处理Windows编码问题
    Nzutf-8PYTHONIOENCODINGi  win32replace)encodingerrorsc                    	 t        | g|i | y# t        $ rl 	 | j                  dd      j                  d      }t        |g|i | Y y#  t        | j                  dd      j                  d      g|i | Y Y yxY ww xY w)u'   安全打印函数，处理编码问题gbkr   )r   asciiN)printUnicodeEncodeErrorencodedecode)textargskwargsencodeds       2C:\dev\xtrs\vdcb\video_processor\console_helper.py
safe_printr      s    	[d$T$V$ [	[kk%	k:AA%HG'+D+F+	[$++gi+8??HZ4ZSYZ[s     	B1A1B BBc                 F    t        d       t        |        t        d       y)u   打印标题<============================================================Nr   )titles    r   print_headerr   *   s    xux    c                 ,    t        d|  d| d|        y)u   打印步骤信息[/z] Nr   )step_numtotalmessages      r   
print_stepr!   0   s    8*AeWBwi01r   c                 &    t        d|  d|        y)u   打印信息行z      z: Nr   )labelvalues     r   
print_infor%   4   s    wb()r   c                      t        d       y)u   打印成功信息u         [OK] 成功Nr    r   r   print_successr(   8   s    "#r   c                      t        d       y)u   打印失败信息u         [FAIL] 失败Nr   r'   r   r   
print_failr*   <   s    $%r   c                  F    t        d       t        d       t        d       y)u   打印完成信息r   u   完成!Nr   r'   r   r   
print_doner,   @   s    xyxr   )__doc__sysosenvironctypeswindllkernel32SetConsoleOutputCPSetConsoleCPplatformioTextIOWrapperstdoutbufferstderrr   r   r!   r%   r(   r*   r,   r'   r   r   <module>r<      s     	 ")

 	}}%%H&% 
 <<7%R%%cjj&7&7'R[\
%R%%cjj&7&7'R[\
[2*$&_	s   <C 'A C$ C!$C(