get_imap_email.py 文件源码

python
阅读 35 收藏 0 点赞 0 评论 0

项目:IMAPmailbox 作者: IMAPMailbox 项目源码 文件源码
def readOptlist(self, optlist):
      for o, a in optlist:
        o = o[2:] # strip the leading --

        if o in configOptions:
          val = getattr(self, o)
          # check to see if the current/default value is a boolean. If so,
          # then the value is true if specified as a flag; otherwise, convert
          # the option value to a bool.
          if val.__class__ == bool:
            if (a == None or len(a) == 0) :
              val = True
            else:
              val = (a.strip().lower() == "true")
          else: 
            val = a
          setattr(self, o, val)

    # ---------------------
        # usage text for help
    # ---------------------
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号