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

Printing to stdout breaks the spinner #42

Open
odisseus opened this issue Mar 27, 2024 · 0 comments
Open

Printing to stdout breaks the spinner #42

odisseus opened this issue Mar 27, 2024 · 0 comments

Comments

@odisseus
Copy link

odisseus commented Mar 27, 2024

If you try to print something while the spinner is spinning, both the spinner and the output will be borked. I didn't really expect it to work, but I think this behaviour is worth documenting, because it isn't mentioned in the readme.

Python 3.12.2, click-spinner 0.1.10.

Steps to reproduce:

from time import sleep

import click_spinner

if __name__ == '__main__':
    with click_spinner.spinner(force=True):
        for i in range(0, 10):
            sleep(i / 10)
            print(i)

ScreenRecording2024-03-27at02 20 50-ezgif com-video-to-apng-converter

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

1 participant