Did I find the right examples for you? yes no

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)

        def urlescape(what):
    import urllib
    return urllib.quote(what.encode('utf-8'))
        


src/p/i/pinyin-toolkit-HEAD/pinyin/dictionaryonline.py   pinyin-toolkit(Download)
def lookup(query, destlanguage):
    # Set up URL
    url = "http://translate.google.com/translate_a/t?client=t&text=%s&sl=%s&tl=%s" % (utils.urlescape(query), 'zh-CN', destlanguage)
    con = urllib2.Request(url, headers={'User-Agent':'Mozilla/5.0 (X11; U; Linux i686) Gecko/20071127 Firefox/2.0.0.11'}, origin_req_host='http://translate.google.com')