manrajgrover / halo

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

Spinner does not animate during some external function call. #170

Closed digital-idiot closed 1 year ago

digital-idiot commented 2 years ago

Description

Spinner does not animate during external function call.

System settings

Error

There is no error message, just the spinner animation is stuck at initial position the entire time.

Expected behaviour

There spinner should animate normally

Steps to recreate

Below is a sample code to reproduce the error:

import json, pdal
from halo import Halo

rt = [
    {
        "type": "readers.las",
        "filename": "Test.las"
    }
]
p = pdal.Pipeline(json.dumps(rt))

with Halo(text='Loading', spinner='dots'):
    p.execute() # Spinner does not animate during this

People to notify

@manrajgrover

shahriyardx commented 1 year ago

This is because the function is blocking