https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/trac/util/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/trac/util/__pycache__/autoreload.cpython-310.pyc
o

�k�`g�@sHddlZddlZddlZddlZddlZdZdd�Zdd�Zdd�ZdS)	�N�cCs�i}	tddd�tj��D��D]J}tj�|�s'tj�|�}|s!ntj�|�r|s*q|�d�r5|dd�}tj�|�s<qt�	|�j
}||vrK|||<q|||krZ||�t�d�q|�t�
t�q)aWhen this function is run from the main thread, it will force other
    threads to exit when any modules currently loaded change.

    :param modification_callback: a function taking a single argument,
                                  the modified file, which is called
                                  every time a modification is
                                  detected

    :param loop_callback: a function taking no arguments, which is
                          called after every modification check

    TNcSsg|]}t|dd��qS)�__file__N)�getattr)�.0�module�r�6/usr/lib/python3/dist-packages/trac/util/autoreload.py�
<listcomp>%s�z$_reloader_thread.<locals>.<listcomp>)z.pycz.pyo����)�filter�sys�modules�values�os�path�isfile�dirname�endswith�stat�st_mtime�exit�time�sleep�_SLEEP_TIME)�modification_callback�
loop_callback�mtimes�filename�mtimerrr�_reloader_threads6

��

�
�r cCs"tjdk}|rdd�}ndd�}tj�tjd�r+|tjd�r#tjntjgtj}n?|rF|tjdd�rFtjddgtjdd�}n$tj�tjdd�rctjtjddgtjdd�}ntjgtj}|d}|rwd	d
�|D�}tj��}d|d<	t�	tj
|||�}|dkr�|Sq�)N�win32cSstj�|�otj�|��d�S)N�.exe)rrr�normpathr�rrrr�<lambda>Bsz(_restart_with_reloader.<locals>.<lambda>cSst�|tj�S)N)r�access�X_OKr$rrrr%Esrr"rz
-script.pycSsg|]}d|�qS)z"%s"r)r�argrrrr	Rsz*_restart_with_reloader.<locals>.<listcomp>�true�RUN_MAINTr)r
�platformrrr�argv�
executable�environ�copy�spawnve�P_WAIT)�is_win32�can_exec�argsr�new_environ�	exit_coderrr�_restart_with_reloader?s.

� $
�r7cs�tj�d�r:g�����fdd�}�fdd�}tj|dd�}|�d�|��zt||�Wd	Sty9Yd	Swz	t	�
t��Wd	StyMYd	Sw)
z@Run the given function and restart any time modules are changed.r*c
stz��i�����d�WdSty(}z
��|j�WYd}~dSd}~wtjt�����d�YdS)Nr)�append�
SystemExit�code�	traceback�print_exceptionr
�exc_info)�e�r4r6�func�kwargsrr�main_threadas�zmain.<locals>.main_threadcs�rt��d�dSdS)Nr)r
rr)r6rr�
check_exitjs�zmain.<locals>.check_exitzMain thread)�target�nameTN)rr.�get�	threading�Thread�	setDaemon�startr �KeyboardInterruptr
rr7)r@rr4rArBrC�threadrr?r�main]s"	
��rM)	rr
rGrr;rr r7rMrrrr�<module>s
)

https://t.me/RX1948 - 2025