python: tornado with iostream