kiara.py 文件源码

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

项目:Automation-Bots 作者: ab-anand 项目源码 文件源码
def OnEnter(self, event):
        input = self.txt.GetValue()
        # input = input.lower()
        app_id = '2V3684-LXELTTTJ9J'
        try:
            # wolframalpha
            client = wolframalpha.Client(app_id)
            res = client.query(input)
            ans = next(res.results).text
            print(ans)
            speak(ans)
        except:
            # wikipedia
            input = input.split(' ')
            input = ' '.join(input[2:])
            print(wikipedia.summary(input))
            speak('Searched wikipedia for '+input)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号