def larch_exec(self, text, debug=True):
        "execute larch command"
        self.debug = debug
        if not self.initialized:
            self.initialize_larch()
        text = text.strip()
        if ('quit', 'exit', 'EOF') in text:
            self.exit()
        else:
            ret = None
            self.input.put(text, lineno=0)
            while len(self.input) > 0:
                block, fname, lineno = self.input.get()
                if len(block) == 0:
                    continue
                if self.local_echo:
                    print( block)
                ret = self.larch.eval(block, fname=fname, lineno=lineno)
                if self.larch.error:
                    err = self.larch.error.pop(0)
                    fname, lineno = err.fname, err.lineno
                    self.write("%s\n" % err.get_error()[1])
                    for err in self.larch.error:
                        if self.debug or ((err.fname != fname or err.lineno != lineno)
                                     and err.lineno > 0 and lineno > 0):
                            self.write("%s\n" % (err.get_error()[1]))
                    self.input.clear()
                    break
                elif ret is not None:
                    self.write("%s\n" % repr(ret))
            self.keep_alive_time = time.time() + self.IDLE_TIME
        return ret is None
dataset/ETHPy150Open xraypy/xraylarch/lib/xmlrpc_server.py/LarchServer.larch_exec/swapped operands of `in`