Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - from contextlib import contextmanager
- @contextmanager
- def profile(name): import time; d1 = time.time(); yield; print name, time.time() - d1
- with profile('Fetching ' + address):
- r = requests.get(adress, headers=headers)
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment                    
                 
                    