1. 首页
  2. 数据库
  3. 其它
  4. python翻译软件实现代码(使用google api完成)

python翻译软件实现代码(使用google api完成)

上传者: 2020-12-31 16:14:58上传 PDF文件 28.36KB 热度 11次
复制代码 代码如下:# -*- 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:’)
下载地址
用户评论