
    %
i	                         d dl Z d dlZd dlZd dlZd dlmZ dad Z G d dej                  Zd Z	e
dk    r e	             dS dS )    N)winoutc                 (   t          j                     t          j                    }dd l}|                    t          j                    |j                   	 	 t          j	        || fdt          j
                  }|t          j        k    r;|                    t          j                                        dd                     nno	 t          j                     t!          d           d S # t          j                     t!          d           w xY w)Nr       z<null>zThread dieing)
win32traceInitRead	GetHandlewin32processSetThreadPrioritywin32apiGetCurrentThreadTHREAD_PRIORITY_BELOW_NORMAL
win32eventWaitForMultipleObjectsINFINITEWAIT_OBJECT_0writereadreplaceTermReadprint)	stopEventfilehandler
   rcs        C:\Users\Dell Inspiron 16\Desktop\tws\AgrotaPowerBi\back-agrota-powerbi\mcp-client-agrota\venv\Lib\site-packages\pythonwin/pywin/tools/TraceCollector.pyCollectorThreadr      s   !##F ""!##\%N  		2#Q
(; B Z---

:?,,44T8DDEEEE 		 o 	os   A0C- -$Dc                        e Zd Zd Zd Zd ZdS )WindowOutputc                     t          j        j        | f|z     t          j        d ddd           | _        t          j        t          | j        | f           d S )Nr   )	r   r   __init__r   CreateEventhStopThread_thread	start_newr   )selfargss     r   r!   zWindowOutput.__init__(   sS    $tgn55%1$1dCC/D,<d+CDDDDD    c                 F    t          j        | j                   d | _        d S N)r   SetEventr#   r&   s    r   _StopThreadzWindowOutput._StopThread-   s$    D,---r(   c                 l    |                                   t          j                            |            d S r*   )r-   r   r   Closer,   s    r   r/   zWindowOutput.Close1   s1    !!$'''''r(   N)__name__
__module____qualname__r!   r-   r/    r(   r   r   r   '   sD        E E E
     ( ( ( ( (r(   r   c                      t           .d} t          | |           a d}t                               |           t                               d           t           S )NzPython Trace Collectorz# This window will display output from any programs that import win32traceutil
# win32com servers registered with '--debug' are in this category.
 )outputWindowr   r   )titlemsgs     r   MakeOutputWindowr9   ;   sU     (#E511 	3rr(   __main__)r$   r   r   r   pywin.frameworkr   r6   r   r   r9   r0   r3   r(   r   <module>r<      s              " " " " " "  6( ( ( ( (6& ( ( ((  & z r(   