halo
halo copied to clipboard
Fix issue 157
#157
Description of new feature, or changes
Change decorator implementation so old codes still work and issue #157 could implement in a new way
Code Example:
from halo import Halo
from time import sleep
# should write stop_text and stop_symbol to implement stop_and_persist function
@Halo(text='Loading {task}', spinner='line')
def run_task(halo_iter=[], stop_text='', stop_symbol=' '):
sleep(3)
tasks1 = ['breakfest', 'launch', 'dinner']
tasks2 = ['morning', 'noon', 'night']
run_task(halo_iter=tasks1, stop_symbol='🦄'.encode('utf-8'), stop_text='Task1 Finished')
run_task(halo_iter=tasks2, stop_text='Finished Time')
Checklist
- [x] Your branch is up-to-date with the base branch
- [ ] You've included at least one test if this is a new feature
- [x] All tests are passing
Related Issues and Discussions
fixes #157
People to notify
@manrajgrover