manrajgrover / halo

💫 Beautiful spinners for terminal, IPython and Jupyter
MIT License
2.86k stars 148 forks source link

BUG REPORT Spinner shows up for each function that runs #136

Open C4PT41ND34DP00L opened 4 years ago

C4PT41ND34DP00L commented 4 years ago

Not sure if this is a bug or if I am doing something wrong But the spinner shows up for each function

Description

SO my code is from halo import Halo import time test_list = [1,2,3,4,5,6,7,8,9] def function1(): time.sleep(2) for num in test_list: test_num = num100 print(test_num) def function2(): time.sleep(2) for num in test_list: test_num = num200 print(test_num) def main(): function1() function2()

spinner = Halo(text='test', text_color="green", spinner='simpleDotsScrolling',placement="right",animation='marquee') spinner.start() main() spinner.stop()

output is test | 100 200 test300 -400 500 600 700 800 900 test /200 400 600 800 1000 1200 1400 1600 1800

using with Halo output is test -100 200 300 400 500 600 700 800 900 test /200 400 600 800 1000 1200 1400 1600 1800

System settings

Expected behaviour

I expected it to shows spinner function1 output function2 output

Steps to recreate

Run example code i provided in windows

People to notify