{"action":"created","issue":{"url":"https://api.github.com/repos/tqdm/tqdm/issues/62","labels_url":"https://api.github.com/repos/tqdm/tqdm/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/tqdm/tqdm/issues/62/comments","events_url":"https://api.github.com/repos/tqdm/tqdm/issues/62/events","html_url":"https://github.com/tqdm/tqdm/issues/62","id":119788509,"number":62,"title":"Support for nested progress bars + readme updates","user":{"login":"lrq3000","id":1118942,"avatar_url":"https://avatars.githubusercontent.com/u/1118942?v=3","gravatar_id":"","url":"https://api.github.com/users/lrq3000","html_url":"https://github.com/lrq3000","followers_url":"https://api.github.com/users/lrq3000/followers","following_url":"https://api.github.com/users/lrq3000/following{/other_user}","gists_url":"https://api.github.com/users/lrq3000/gists{/gist_id}","starred_url":"https://api.github.com/users/lrq3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrq3000/subscriptions","organizations_url":"https://api.github.com/users/lrq3000/orgs","repos_url":"https://api.github.com/users/lrq3000/repos","events_url":"https://api.github.com/users/lrq3000/events{/privacy}","received_events_url":"https://api.github.com/users/lrq3000/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tqdm/tqdm/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/tqdm/tqdm/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":{"login":"lrq3000","id":1118942,"avatar_url":"https://avatars.githubusercontent.com/u/1118942?v=3","gravatar_id":"","url":"https://api.github.com/users/lrq3000","html_url":"https://github.com/lrq3000","followers_url":"https://api.github.com/users/lrq3000/followers","following_url":"https://api.github.com/users/lrq3000/following{/other_user}","gists_url":"https://api.github.com/users/lrq3000/gists{/gist_id}","starred_url":"https://api.github.com/users/lrq3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrq3000/subscriptions","organizations_url":"https://api.github.com/users/lrq3000/orgs","repos_url":"https://api.github.com/users/lrq3000/repos","events_url":"https://api.github.com/users/lrq3000/events{/privacy}","received_events_url":"https://api.github.com/users/lrq3000/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2015-12-01T19:24:14Z","updated_at":"2015-12-19T01:08:03Z","closed_at":null,"body":"tqdm should support displaying nested progress bars, in particular when using nested loops:\r\n\r\n```\r\nfrom tqdm import trange\r\nfrom time import sleep\r\nfor i in trange(10, desc='outer loop', leave=True):\r\n    for j in trange(100, desc='inner loop'):\r\n        sleep(0.01)\r\n```\r\n\r\nThis currently does not work because the outer loop is always deleted and replaced by the inner loop.\r\n\r\nA simple fix would be to allow StatusPrinter to avoid using the `\\r` replacing character when displaying the inner loop to not replace the outer loop. This is the approach taken by [ipy-progressbar](https://github.com/aplavin/ipy-progressbar).\r\n\r\nAnother way would be to update both bars independently, which is currently done for tqdm_notebook. But I'm not sure this is possible inside a terminal (is there a way to replace not only the current line but also the x previous lines? ie, the opposite of a line return).\r\n\r\nWe should then update the README to add this use case.\r\n\r\nAlso, we should add in the README that tqdm does not require any dependency, in particular curses (which is commonly required for various console utilities), this would fix https://github.com/noamraph/tqdm/issues/16."},"comment":{"url":"https://api.github.com/repos/tqdm/tqdm/issues/comments/165930048","html_url":"https://github.com/tqdm/tqdm/issues/62#issuecomment-165930048","issue_url":"https://api.github.com/repos/tqdm/tqdm/issues/62","id":165930048,"user":{"login":"lrq3000","id":1118942,"avatar_url":"https://avatars.githubusercontent.com/u/1118942?v=3","gravatar_id":"","url":"https://api.github.com/users/lrq3000","html_url":"https://github.com/lrq3000","followers_url":"https://api.github.com/users/lrq3000/followers","following_url":"https://api.github.com/users/lrq3000/following{/other_user}","gists_url":"https://api.github.com/users/lrq3000/gists{/gist_id}","starred_url":"https://api.github.com/users/lrq3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrq3000/subscriptions","organizations_url":"https://api.github.com/users/lrq3000/orgs","repos_url":"https://api.github.com/users/lrq3000/repos","events_url":"https://api.github.com/users/lrq3000/events{/privacy}","received_events_url":"https://api.github.com/users/lrq3000/received_events","type":"User","site_admin":false},"created_at":"2015-12-19T01:08:03Z","updated_at":"2015-12-19T01:08:03Z","body":"Yes I already tried to fix it, but I didn't find an elegant way.\n\nWe would need to add a parameter to tell tqdm what nested level we're at so\nthat the cursor would be moved to the correct place.\n\nAnd indeed, setting leave=False fix the issue, but anyway even without\nfixing it I think it's still ok (we see the completed progress bars, the\nuser then doesn't need them anymore, the cursor position artefact is but a\ntiny inconvenience to me).\n\n2015-12-19 1:13 GMT+01:00 Casper da Costa-Luis <notifications@github.com>:\n\n> Reopened #62 <https://github.com/tqdm/tqdm/issues/62>.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/tqdm/tqdm/issues/62#event-496369655>.\n>\n"}}