Main.py 文件源码

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

项目:nodemcu-pyflasher 作者: marcelstoer 项目源码 文件源码
def write(self, string):
        if string.startswith("\r"):
            # carriage return -> remove last line i.e. reset position to start of last line
            current_value = self.__out.GetValue()
            last_newline = current_value.rfind("\n")
            new_value = current_value[:last_newline + 1]  # preserve \n
            new_value += string[1:]  # chop off leading \r
            wx.CallAfter(self.__out.SetValue, new_value)
        else:
            wx.CallAfter(self.__out.AppendText, string)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号