Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nester Bar not working #187

Closed
t-abraham opened this issue Sep 4, 2022 · 1 comment
Closed

Nester Bar not working #187

t-abraham opened this issue Sep 4, 2022 · 1 comment

Comments

@t-abraham
Copy link

I am trying to implement a nested progress bar where the description updates every iteration. According to my understanding, it was supposed to be 2 bars. Lets say the outer bar and then the inner bar. So as the inner bar reached 100% it fills up the outer bar progress a certain percentage and then goes again into the inner bar. However in my code, the output is getting completely messy with not proper output.

import time
from alive_progress import alive_bar

def start_loop1():
	with alive_bar(total=10, dual_line=True, title="Outer Loop") as pbar1:
		for i in range(10):
 			# print ("\nworking on outer iteration - {}".format(i))
 			pbar1.title("Outer Loop Iteration - {}".format(i))
 			time.sleep(1)
 			start_loop2()
 			pbar1(1)
			
def start_loop2():
	with alive_bar(total=5, dual_line=True, title="Inner Loop") as pbar2:
		for i in range(5):
 			# print ("\nworking on inner iteration - {}".format(i))
			pbar2.title("Inner Loop Iteration - {}".format(i))
			time.sleep(0.2)
			pbar2(1)
			
#%% Standalone Run

if __name__ == "__main__":
	start_loop1()

IPython 7.34.0
Python 3.9.12
Spyder 5.3.2
PyQt5 5.15.7
alive-progress 2.4.1

@rsalmei
Copy link
Owner

rsalmei commented Sep 5, 2022

There isn't support for nested bars yet.
Please, look for issues before opening new ones, this is already here in #20.

@rsalmei rsalmei closed this as completed Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants