Python Tutorial

Wednesday, June 4, 2014

Python multi threading vs multi processing

A very good article on python multi threading vs multi processing

Python Requests: HTTP for Humans

Python requests module provides very interactive way to access web content via proper HTTP protocol.

Here is the installation manual. You can also install using pip :
pip install requests

import requests

r = requests.get('', auth=('user', 'pass'))
print r.status_code
print r.headers['content-type']
print r.encoding
print r.text
print r.json()

'application/json; charset=utf8'
{u'private_gists': 419, u'total_private_repos': 77, ...}

Python webbrowser

Python webrowser provides high-level interface to displaying Web-based documents.
import webbrowser

url ='', new=0, autoraise=True)


This code will open url to existing web browser and raised the window.