merac-o-matic-gui.py 文件源码

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

项目:merac-o-matic 作者: RogueAI42 项目源码 文件源码
def generate():
    global sound
    statement = coremeraco.constructRegularStatement() + os.linesep
    textArea.insert(Tkinter.END, statement)
    textArea.yview(Tkinter.END)
    if readOption and readOutputState.get():
        if sound:
            sound.stop()
        sound = playsnd.playsnd()
        threading.Thread(target=sound.play, args=(procfest.text2wave(statement),)).start()
    if saveOutputState.get():
        try:
            outputFileHandler = open(saveOutputDestination.get(), 'a') # 'a' means append mode
            outputFileHandler.write(statement)
            outputFileHandler.close()
        except IOError as Argument:
            tkMessageBox.showerror(productName, meracolocale.getLocalisedString(localisationFile, "ioErrorMessage") + str(Argument))
        except Exception as Argument:
            tkMessageBox.showerror(productName, meracolocale.getLocalisedString(localisationFile, "genericErrorMessage") + str(Argument))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号