wxnsc.py 文件源码

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

项目:SameKeyProxy 作者: xzhou 项目源码 文件源码
def _log(self, line, status='info'):
      """Writing given line to the log-textCtrl.

      :Parameters:
         - `line`: text to log
         - `status`: status should be 'info' or 'error'. If 'info' the
                     text will be colored blue, if 'error' the text will
                     be red.
      """
      start = self.txtCtrlLog.GetLastPosition()
      self.txtCtrlLog.AppendText('%s\n' % line)
      color = wx.BLACK
      if status == 'info':
         color = wx.BLUE
      elif status == 'error':
         color = wx.RED
      self.txtCtrlLog.SetStyle(start, self.txtCtrlLog.GetLastPosition(),
                               wx.TextAttr(color))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号