wxSpellCheckerDialog.py 文件源码

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

项目:Taigabot 作者: FrozenPigs 项目源码 文件源码
def _test():
    class TestDialog(wxSpellCheckerDialog):
        def __init__(self,*args):
            wxSpellCheckerDialog.__init__(self,*args)
            wx.EVT_CLOSE(self,self.OnClose)
        def OnClose(self,evnt):
            chkr = dlg.GetSpellChecker()
            if chkr is not None:
                printf(["AFTER:", chkr.get_text()])
            self.Destroy()
    from enchant.checker import SpellChecker
    text = "This is sme text with a fw speling errors in it. Here are a fw more to tst it ut."
    printf(["BEFORE:", text])
    app = wx.PySimpleApp()
    dlg = TestDialog()
    chkr = SpellChecker("en_US",text)
    dlg.SetSpellChecker(chkr)
    dlg.Show()
    app.MainLoop()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号