<s> import sys <EOL> sys . path . append ( '<STR_LIT>' ) <EOL> def inner ( signals = False , condition = None , event_notifier = None ) : <EOL> def before_shutdown ( ) : <EOL> print "<STR_LIT>" <EOL> import signal <EOL> import voodoo . gen . launcher as Launcher <EOL> import voodoo . rt_debugger as rt_debugger <EOL> rt_debugger . launch_debugger ( ) <EOL> if condition is not None : <EOL> waiters = ( Launcher . ConditionWait ( condition ) , ) <EOL> elif signals : <EOL> waiters = ( <EOL> Launcher . SignalWait ( signal . SIGTERM ) , <EOL> Launcher . SignalWait ( signal . SIGINT ) , <EOL> Launcher . RawInputWait ( "<STR_LIT>" ) , <EOL> ) <EOL> else : <EOL> waiters = ( <EOL> Launcher . RawInputWait ( "<STR_LIT>" ) , <EOL> ) <EOL> event_notifiers = ( <EOL> Launcher . FileNotifier ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ) <EOL> if event_notifier : <EOL> event_notifiers += ( Launcher . ConditionNotifier ( event_notifier ) , ) <EOL> launcher = Launcher . Launcher ( <EOL> '<STR_LIT:.>' , <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> waiters , <EOL> "<STR_LIT>" , <EOL> before_shutdown , <EOL> event_notifiers <EOL> ) <EOL> launcher . _wait_condition = condition <EOL> return launcher <EOL> def launch ( signals = False ) : <EOL> launcher = inner ( signals = signals ) <EOL> launcher . launch ( ) <EOL> return launcher <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> try : <EOL> from werkzeug . serving import run_with_reloader <EOL> except ImportError : <EOL> print "<STR_LIT>" <EOL> launch ( signals = True ) <EOL> else : <EOL> run_with_reloader ( launch ) </s>
