Practing Python with httplib and threads