You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "Nesting Lives" is a natural landing point for people trying to solve certain types of issues, but the documentation says that you can't do it, but then says you can - or at least, the current wording seems to do this:
Note that only a single live context may be active at any one time. The following will raise a LiveError because status also uses Live:
with Live(table, console=console):
with console.status("working"): # Will not work
do_work()
In practice this is rarely a problem because you can display any combination of renderables in a Live context.
To a beginner, it is very unclear what this last line means, isn't that nesting?
The example given is also tantalizingly close to what a user might be there looking for, to be able to render output with a spinner but make it transient via Live, without having to significantly change other code, for example:
with Live(transient=True) as tr:
with Status(console=tr.console) as st:
time.sleep(1)
print("Hi")
time.sleep(2)
print("Bye")
time.sleep(1)
the lack of a counter example, demonstrating what to do instead, is a missed opportunity.
The text was updated successfully, but these errors were encountered:
Describe the bug
The "Nesting Lives" is a natural landing point for people trying to solve certain types of issues, but the documentation says that you can't do it, but then says you can - or at least, the current wording seems to do this:
To a beginner, it is very unclear what this last line means, isn't that nesting?
The example given is also tantalizingly close to what a user might be there looking for, to be able to render output with a spinner but make it transient via Live, without having to significantly change other code, for example:
the lack of a counter example, demonstrating what to do instead, is a missed opportunity.
The text was updated successfully, but these errors were encountered: