#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2008 Doug Hellmann All rights reserved. # """ """ #end_pymotw_header import urllib query_args = { 'q':'query string', 'foo':'bar' } encoded_args = urllib.urlencode(query_args) url = 'http://localhost:8080/' print urllib.urlopen(url, encoded_args).read()