
    ph*                     F    S r SSKrSSKJr   " S S\R                  5      rg)z(Utilities for logging and progress bars.    N)tqdmc                       \ rS rSrSrS rSrg)TqdmHandler   zRLogging handler that writes through ``tqdm`` in order to not break
progress bars.
c                      U R                  U5      n[        R                  " X R                  U R                  S9  U R                  5         g ! [         a    U R                  U5         g f = f)N)fileend)formatr   writestream
terminatorflush	ExceptionhandleError)selfrecordmsgs      C/home/james-whalen/.local/lib/python3.13/site-packages/pyphi/log.pyemitTqdmHandler.emit   sQ    	%++f%CJJs$//BJJL 	%V$	%s   A
A A+*A+ N)__name__
__module____qualname____firstlineno____doc__r   __static_attributes__r       r   r   r      s    %r   r   )r   loggingr   StreamHandlerr   r   r   r   <module>r!      s"   
 /  
%''' 
%r   