use greenlet to simplify handling of ipy shell replies