Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
stdin-to-pastebin script by @catlee
import urllib, sys
if len(sys.argv) == 2:
url = "" % sys.argv[1]
fmt = sys.argv[1]
url = ""
fmt = "None"
body =
params = [
('parent_pid', ''),
('code2', body),
('poster', ''),
('expiry', 'd'),
('paste', 'Send'),
('format', fmt),
data = urllib.urlencode(params)
req = urllib.urlopen(url, data)
print req.geturl()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.