在技能编辑界面学会所有的技能。运行脚本前, 将鼠标放在第一个技能的技能等级
    的数字上, 并选中所有文本。然后运行此脚本, 并在1秒内切回到修改器界面。
    
    :param level: 技能等级
    :param master_level: 专精等级, 0是普通, 1是专家, 2是大师
420423
def learn_all_skill(level=60, master_level=0):
    
    level = str(level)
    bot.delay(1.0)
    for i in range(31): # 一共31个技能
        bot.type_string(level)
        bot.tab()
        bot.up(n=2)
        bot.down(n=master_level)
        bot.tab()
993335
def _print_level(level, msg):
    """"""
    for l in str(msg.rstrip()).split("\n"):
        print("{0:<9s}{1}".format(level, str(l)))
853362
def master_ref(self):
        
        return ReferencesDataFrame(self._engine_dataframe.getReferences().getHEAD(),
                                   self._session, self._implicits)
819968
def level(self, level, time=0):
        """"""
        if level <= 0:
            self._elk.send(pf_encode(self._index))
        elif level >= 98:
            self._elk.send(pn_encode(self._index))
        else:
            self._elk.send(pc_encode(self._index, 9, level, time))
1003320
def allval(self):
        

        d = dict(self.__dict__.items())
        d['sl'] = self.sl

        d[self.level] = 0

        cls = self.get_class(self.sl)

        return cls(**d)
1204043
def logToMaster(self, text, level=logging.INFO):
        
        logger.log(level=level, msg=("LOG-TO-MASTER: " + text))
        self.loggingMessages.append(dict(text=text, level=level))
451337
def set_web_master(self):
        """"""
        try:
            self.web_master = self.soup.find('webmaster').string
        except AttributeError:
            self.web_master = None
168426
def validateMasterArgument(self, master_arg):
        
        if master_arg[:5] == "http:":
            raise usage.UsageError("<master> is not a URL - do not use URL")

        if ":" not in master_arg:
            master = master_arg
            port = 9989
        else:
            master, port = master_arg.split(":")

        if not master:
            raise usage.UsageError("invalid <master> argument '{}'".format(
                                   master_arg))
        try:
            port = int(port)
        except ValueError:
            raise usage.UsageError("invalid master port '{}', "
                                   "needs to be a number".format(port))

        return master, port
65312
def set_level(cls, level):
        
        level = (
            level
            if not is_str(level)
            else int(LOGGING_LEVELS.get(level.upper(), level))
        )

        for handler in root.handlers:
            handler.setLevel(level)

        root.setLevel(level)
633712
def getSequence(self, level=0):
        ''''''

        seq = []
        op = ''
        left_operand = None
        right_operand = None
        sequence_closed = False
        while True:
            c = self.next()
            if not c:
                break
            if c and c not in self.meta_chars:
                seq.append(self.getLiteral())
            elif c and c == u'$' and self.lookahead() == u'{':
                seq.append(self.getSource())
            elif c == u'[' and not self.last() == u'\\':
                seq.append(self.getCharacterSet())
            elif c == u'(' and not self.last() == u'\\':
                seq.append(self.getSequence(level + 1))
            elif c == u')' and not self.last() == u'\\':
                # end of this sequence
                if level == 0:
                    # there should be no parens here
                    raise StringGenerator.SyntaxError(u"Extra closing parenthesis")
                sequence_closed = True
                break
            elif c == u'|' and not self.last() == u'\\':
                op = c
            elif c == u'&' and not self.last() == u'\\':
                op = c
            else:
                if c in self.meta_chars and not self.last() == u"\\":
                    raise StringGenerator.SyntaxError(u"Un-escaped special character: %s" % c)
            
            #print( op,len(seq) )
            if op and not left_operand:
                if not seq or len(seq) < 1:
                    raise StringGenerator.SyntaxError(u"Operator: %s with no left operand" % op)
                left_operand = seq.pop()
            elif op and len(seq) >= 1 and left_operand:
                right_operand = seq.pop()

                #print( "popped: [%s] %s:%s"%( op, left_operand, right_operand) )
                if op == u'|':
                    seq.append(StringGenerator.SequenceOR([left_operand, right_operand]))
                elif op == u'&':
                    seq.append(StringGenerator.SequenceAND([left_operand, right_operand]))

                op = u''
                left_operand = None
                right_operand = None

        # check for syntax errors
        if op:
            raise StringGenerator.SyntaxError(u"Operator: %s with no right operand" % op)
        if level > 0 and not sequence_closed:
            # it means we are finishing a non-first-level sequence without closing parens
            raise StringGenerator.SyntaxError(u"Missing closing parenthesis")

        return StringGenerator.Sequence(seq)
730570
def level(self):
        
        res = len(self._scope_stack)
        if self._parent is not None:
            res += self._parent.level()
        return res
372965
def tree(self, level=0, prefix=''):
        
        text = '%s%s\n' % (prefix, self.value.text)
        prefix = '%s└── ' % ('    ' * level)
        if self._lesser:
            text += self._lesser.tree(level+1, prefix)
        if self._greater:
            text += self._greater.tree(level+1, prefix)
        return text
597639
def copyMasterDetail( dbid, destrid, sourcerid, copyfid = nil, recurse = nil, relfids = nil )
      
      raise "copyfid must be specified when destrid is 0." if destrid == "0" and copyfid.nil?
      
      @dbid, @destrid, @sourcerid, @copyfid, @recurse, @relfids = dbid, destrid, sourcerid, copyfid, recurse, relfids
 
      xmlRequestData = toXML( :destrid, @destrid)
      xmlRequestData << toXML( :sourcerid, @sourcerid )
      xmlRequestData << toXML( :copyfid, @copyfid ) if @copyfid
      xmlRequestData << toXML( :recurse, @recurse ) if @recurse
      xmlRequestData << toXML( :relfids, @relfids ) if @relfids

      sendRequest( :copyMasterDetail, xmlRequestData )

      @parentrid = getResponseValue( :parentrid )
      @numCreated = getResponseValue( :numCreated )

      return self if @chainAPIcalls
      return @parentrid, @numCreated
   end
253291
protected void processFromItem(FromItem fromItem, int level) {
        if (fromItem instanceof SubJoin) {
            SubJoin subJoin = (SubJoin) fromItem;
            if (subJoin.getJoinList() != null && subJoin.getJoinList().size() > 0) {
                for (Join join : subJoin.getJoinList()) {
                    if (join.getRightItem() != null) {
                        processFromItem(join.getRightItem(), level + 1);
                    }
                }
            }
            if (subJoin.getLeft() != null) {
                processFromItem(subJoin.getLeft(), level + 1);
            }
        } else if (fromItem instanceof SubSelect) {
            SubSelect subSelect = (SubSelect) fromItem;
            if (subSelect.getSelectBody() != null) {
                processSelectBody(subSelect.getSelectBody(), level + 1);
            }
        } else if (fromItem instanceof ValuesList) {

        } else if (fromItem instanceof LateralSubSelect) {
            LateralSubSelect lateralSubSelect = (LateralSubSelect) fromItem;
            if (lateralSubSelect.getSubSelect() != null) {
                SubSelect subSelect = lateralSubSelect.getSubSelect();
                if (subSelect.getSelectBody() != null) {
                    processSelectBody(subSelect.getSelectBody(), level + 1);
                }
            }
        }
        //Table时不用处理
    }
817324
def as_tree(self, level=0):
        
        ret = '--' * level + repr(self) + '\n'
        for routing_node in self:
            ret += routing_node.as_tree(level+1)
        return ret
554623
def set_detail_level(self, detail_levels):
        
        if detail_levels is None:
            return

        self.detail_levels = detail_levels
        if 'api' in detail_levels:
            self.api_detail_level = detail_levels['api']
        if 'http' in detail_levels:
            self.http_detail_level = detail_levels['http']
        if isinstance(self.api_detail_level, int):
            self.api_maxlen = self.api_detail_level
        if isinstance(self.http_detail_level, int):
            self.http_maxlen = self.http_detail_level
978093
def process_master(m):
    ''''''
    try:
        s = m.recv(16*1024)
    except Exception:
        time.sleep(0.1)
        return
    # prevent a dead serial port from causing the CPU to spin. The user hitting enter will
    # cause it to try and reconnect
    if len(s) == 0:
        time.sleep(0.1)
        return

    if (mpstate.settings.compdebug & 1) != 0:
        return

    if mpstate.logqueue_raw:
        mpstate.logqueue_raw.put(str(s))

    if mpstate.status.setup_mode:
        if mpstate.system == 'Windows':
           # strip nsh ansi codes
           s = s.replace("\033[K","")
        sys.stdout.write(str(s))
        sys.stdout.flush()
        return

    if m.first_byte and opts.auto_protocol:
        m.auto_mavlink_version(s)
    msgs = m.mav.parse_buffer(s)
    if msgs:
        for msg in msgs:
            sysid = msg.get_srcSystem()
            if sysid in mpstate.sysid_outputs:
                  # the message has been handled by a specialised handler for this system
                  continue
            if getattr(m, '_timestamp', None) is None:
                m.post_message(msg)
            if msg.get_type() == "BAD_DATA":
                if opts.show_errors:
                    mpstate.console.writeln("MAV error: %s" % msg)
                mpstate.status.mav_error += 1