python socket snip