__init__.py 文件源码

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

项目:dictationbridge-nvda 作者: dictationbridge 项目源码 文件源码
def flushCurrentEntry():
    global currentEntry, autoFlushTimer
    if autoFlushTimer is not None:
        autoFlushTimer.Stop()
        autoFlushTimer = None
    start, text = currentEntry
    text = text.replace("\r\n", "\n")
    text = text.replace("\r", "\n")
    while True:
        i = text.find("\n")
        if i == -1:
            break
        if i > 0:
            speech.speakText(text[:i])
        if text[i:i + 2] == "\n\n":
            speech.speakText("new paragraph")
            text = text[i + 2:]
        else:
            speech.speakText("new line")
            text = text[i + 1:]
    if text != "":
        speech.speakText(text)
    braille.handler.handleCaretMove(api.getFocusObject())
    currentEntry = None
    requestWSRShowHideEvents()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号