#!/usr/bin/env python import sys, requests if __name__ == '__main__': text = sys.stdin.readlines() url = requests.post("http://paste.pm/post", {'content': text}).text print "http://paste.pm" + url