Mini Shell
a
�DOg�� � @ s d Z ddlZddlZddlZddlZddlmZ ddl
mZ ddlm
ZmZ zddlmZ W n eyz ddlmZ Y n0 g d�ZejZejZejZejZzejZdZe�d � W n e y� d
ZY n0 ej!Z"z
ej#Z$W n e y� dZ$Y n0 ej%Z%[da&da'dd� Z(d
d� Z)eZ*dd� Z#G dd� d�Z+e+Z,G dd� d�Z-G dd� d�Z.G dd� de.�Z/G dd� d�Z0G dd� d�Z1G dd� de2�Z3e� j4Z5e5� dKd d!�Z6e#� a7i Z8i Z9e� Z:e� a;e<� a=d"d#� Z>G d$d%� d%�Z?zdd&lm@aAmBZC W nF e�y2 dd'lDmEZF dd(lmGZG eGd)d*�ZBd+d)� ZCd,d-� aAY n0 d.d/� ZHG d0d1� d1e?�ZIG d2d3� d3e?�ZJG d4d5� d5e?�ZKd6d7� ZLeLZMd8d9� ZNeNZOd:d;� ZPd<d=� ZQg ZRd
aSd>d?� ZTdd@lmUZU eJ� aVdAdB� ZWdCdD� ZXzddElmYZZ W n e�y� ddFl[mZZZ Y n0 dGdH� Z\e]edI��rej^e\dJ� dS )Lz;Thread module emulating a subset of Java's threading model.� N)� monotonic)�WeakSet)�islice�count)�deque)� get_ident�active_count� Condition�current_thread� enumerate�main_thread�TIMEOUT_MAX�Event�Lock�RLock� Semaphore�BoundedSemaphore�Thread�Barrier�BrokenBarrierError�Timer�ThreadError�
setprofile�settrace�local�
stack_size�
excepthook�ExceptHookArgsT�
get_native_idFc C s | a dS )z�Set a profile function for all threads started from the threading module.
The func will be passed to sys.setprofile() for each thread, before its
run() method is called.
N)�
_profile_hook��func� r"