Created
June 11, 2012 18:28
-
-
Save jan-matejka/2911779 to your computer and use it in GitHub Desktop.
btr wtf?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| from httplib import HTTPConnection as C | |
| def do_shit(): | |
| c = C('www.google.com') | |
| c.request("GET", "/") | |
| r = c.getresponse() | |
| data = r.read() | |
| return r, data | |
| r,d = do_shit() | |
| print "response: %s" % r | |
| print "data: %s" % d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment