python翻译软件实现代码(使用google api完成)
复制代码 代码如下:# -*- coding: utf-8 -*- import httplibfrom urllib import urlencodeimport re def out(text): p = re.compile(r'”,”‘) m = p.split(text) print m[0][4:].decode(‘UTF-8’).encode(‘GBK’) if __name__==’__main__’: while True: word=raw_input(‘Input the word you want to search:’)
下载地址
用户评论