# -*- coding: utf-8 -*- import urllib,httplib data = {"content":"import test; print test","language":"Python","title":"","poster":"","hold":""} params = urllib.urlencode(data) headers = {"http-equiv": "Content-Type", " content": "text/html","charset":"utf8"} connection = httplib.HTTPConnection("www.dpaste.com:80") connection.request("POST", "/", params) otvet = connection.getresponse() print otvet.status, otvet.reason dataa = otvet.read() print dataa connection.close()