<s> """<STR_LIT>""" <EOL> __all__ = [ '<STR_LIT:error>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , <EOL> '<STR_LIT>' , '<STR_LIT>' ] <EOL> import traceback as _traceback <EOL> class error ( Exception ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , * args ) : <EOL> self . args = args <EOL> def start_new_thread ( function , args , kwargs = { } ) : <EOL> """<STR_LIT>""" <EOL> if type ( args ) != type ( tuple ( ) ) : <EOL> raise TypeError ( "<STR_LIT>" ) <EOL> if type ( kwargs ) != type ( dict ( ) ) : <EOL> raise TypeError ( "<STR_LIT>" ) <EOL> global _main <EOL> _main = False <EOL> try : <EOL> function ( * args , ** kwargs ) <EOL> except SystemExit : <EOL> pass <EOL> except : <EOL> _traceback . print_exc ( ) <EOL> _main = True <EOL> global _interrupt <EOL> if _interrupt : <EOL> _interrupt = False <EOL> raise KeyboardInterrupt <EOL> def exit ( ) : <EOL> """<STR_LIT>""" <EOL> raise SystemExit <EOL> def get_ident ( ) : <EOL> """<STR_LIT>""" <EOL> return - <NUM_LIT:1> <EOL> def allocate_lock ( ) : <EOL> """<STR_LIT>""" <EOL> return LockType ( ) <EOL> def stack_size ( size = None ) : <EOL> """<STR_LIT>""" <EOL> if size is not None : <EOL> raise error ( "<STR_LIT>" ) <EOL> return <NUM_LIT:0> <EOL> class LockType ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self ) : <EOL> self . locked_status = False <EOL> def acquire ( self , waitflag = None ) : <EOL> """<STR_LIT>""" <EOL> if waitflag is None or waitflag : <EOL> self . locked_status = True <EOL> return True <EOL> else : <EOL> if not self . locked_status : <EOL> self . locked_status = True <EOL> return True <EOL> else : <EOL> return False <EOL> __enter__ = acquire <EOL> def __exit__ ( self , typ , val , tb ) : <EOL> self . release ( ) <EOL> def release ( self ) : <EOL> """<STR_LIT>""" <EOL> if not self . locked_status : <EOL> raise error <EOL> self . locked_status = False <EOL> return True <EOL> def locked ( self ) : <EOL> return self . locked_status <EOL> _interrupt = False <EOL> _main = True <EOL> def interrupt_main ( ) : <EOL> """<STR_LIT>""" <EOL> if _main : <EOL> raise KeyboardInterrupt <EOL> else : <EOL> global _interrupt <EOL> _interrupt = True </s>
