Small instant messaging program in Python