# -*- coding: utf-8 -*- #/usr/bin/python import urllib import simplejson url="http://ajax.googleapis.com/ajax/services/language/translate" params={} params['langpair']='|en' params['v']='1.0' params['q']="Bonjour mon ami!" data=urllib.urlencode(params) response=urllib.urlopen(url,data) json=simplejson.load(response) print json['responseData']['translatedText'] wait=raw_input()
Babelpython
This should be fairly obvious what it is doing.
0 comments:
Post a Comment