def _handle_input(self, expr, from_input_panel,
                      handler="quicklojure_handlers.OutputToRepl", handler_args={}):
        repl_view = get_repl_view(self.window)
        expr = Template(expr).safe_substitute(from_input_panel=from_input_panel)

        port = int(repl_view.settings().get('nrepl_port'))
        client = nrepl.NreplClient('localhost', port)
        handler_class = resolve_attr(handler)
        handler_obj = handler_class(args=handler_args,
                                    window=self.window,
                                    repl_view=repl_view)
        thread.start_new_thread(client.eval, (expr, handler_obj))
 def is_enabled(self):
     return bool(get_repl_view(self.window))
 def is_enabled(self):
     return not get_repl_view(self.window)