{"action":"created","issue":{"url":"https://api.github.com/repos/rossant/ipycache/issues/16","labels_url":"https://api.github.com/repos/rossant/ipycache/issues/16/labels{/name}","comments_url":"https://api.github.com/repos/rossant/ipycache/issues/16/comments","events_url":"https://api.github.com/repos/rossant/ipycache/issues/16/events","html_url":"https://github.com/rossant/ipycache/issues/16","id":36461305,"number":16,"title":"output in cached cells is delayed","user":{"login":"ihrke","id":1140241,"avatar_url":"https://avatars.githubusercontent.com/u/1140241?v=3","gravatar_id":"","url":"https://api.github.com/users/ihrke","html_url":"https://github.com/ihrke","followers_url":"https://api.github.com/users/ihrke/followers","following_url":"https://api.github.com/users/ihrke/following{/other_user}","gists_url":"https://api.github.com/users/ihrke/gists{/gist_id}","starred_url":"https://api.github.com/users/ihrke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ihrke/subscriptions","organizations_url":"https://api.github.com/users/ihrke/orgs","repos_url":"https://api.github.com/users/ihrke/repos","events_url":"https://api.github.com/users/ihrke/events{/privacy}","received_events_url":"https://api.github.com/users/ihrke/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rossant/ipycache/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2014-06-25T09:13:19Z","updated_at":"2015-01-23T14:55:52Z","closed_at":null,"body":"Hi,\r\n\r\nwhen running a cell under the `%%cache` magic, the output is delayed until the evaluation has finished. I.e., in the following code, `1` shows up after 10 secs.\r\n\r\n```\r\n%%cache 'test.pkl' var\r\nimport time\r\nfor i in range(10):\r\n    time.sleep(1)\r\n    print i\r\nvar=2\r\n```\r\n\r\nI usually insert progress-bars or other on-the-fly output to long computations so that I'm able to estimate how long they are going to take. \r\nIs it possible to enable dynamic output in ipycache? I'm not sure what would be the best way to proceed since I'm not very familiar with ipython's internals.\r\n"},"comment":{"url":"https://api.github.com/repos/rossant/ipycache/issues/comments/71204365","html_url":"https://github.com/rossant/ipycache/issues/16#issuecomment-71204365","issue_url":"https://api.github.com/repos/rossant/ipycache/issues/16","id":71204365,"user":{"login":"rossant","id":1942359,"avatar_url":"https://avatars.githubusercontent.com/u/1942359?v=3","gravatar_id":"","url":"https://api.github.com/users/rossant","html_url":"https://github.com/rossant","followers_url":"https://api.github.com/users/rossant/followers","following_url":"https://api.github.com/users/rossant/following{/other_user}","gists_url":"https://api.github.com/users/rossant/gists{/gist_id}","starred_url":"https://api.github.com/users/rossant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rossant/subscriptions","organizations_url":"https://api.github.com/users/rossant/orgs","repos_url":"https://api.github.com/users/rossant/repos","events_url":"https://api.github.com/users/rossant/events{/privacy}","received_events_url":"https://api.github.com/users/rossant/received_events","type":"User","site_admin":false},"created_at":"2015-01-23T14:55:52Z","updated_at":"2015-01-23T14:55:52Z","body":"I'm wondering if it would be possible to just not use IPython's code but an entirely custom context manager? something like http://stackoverflow.com/questions/16571150/how-to-capture-stdout-output-from-a-python-function-call\r\n\r\nI initially used whatever IPython did because that was just quicker, but if it's too limited we can use something else."}}