oh jesus, with statement, where have you been all my life
fixed python unicode issue for IPs