-
Notifications
You must be signed in to change notification settings - Fork 148
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
Provide option to render more than one spinner at the same time #17
Comments
@manrajgrover maybe one simply needs to initialize that if two spinners are spinning. Then, simply print a new line betweem them? |
@bertokhoury It can surely be tried. I was also looking to explore how other libraries do the same thing. listr is one of them. Do let me know if you get a chance to implement your solution. Also, feel free to send a PR for the same. 😄 |
@manrajgrover I found that they use list and line counter to push string, render and clear in listr→listr-update-renderer→log-update→ansi-escapes. example# render
output = ['/ First task', '- Second task', '+ Last task']
stream.write('\n'.join(output))
# output maybe
# / First task
# - Second task
# + Last task
# clear
line_count = len(output)
for i in range(line_count):
stream.write('\r')
stream.write(CLEAR_LINE)
stream.write('\033[1A') # Move the cursor up 1 line refer |
@jungwinter That is such a clever solution! I guess we can support that. We would need to think of a design to accommodate this considering each spinner has its own thread and we would need to get the frame from each spinner before rendering. Let me know if you have already thought about the same. |
I would like to work on this issue. @manrajgrover could you assign me on this? |
Any updates on this feature? I would like to use something like this |
@JustinTervala there seems to be some progress in #155 which implements something similar. Have a look at the PR to see if it meets your requirement. |
#155 looks like it would work for me. |
Suppose you get multiple long tasks at hand.
It should be nice to be able to start more than one spinner before finishing the last one
take this as an example:
The text was updated successfully, but these errors were encountered: