def is_in_interactive() -> bool:
    """Check if user is running spaCy from an interactive Python
    shell. Will return True in Jupyter notebooks too.
    RETURNS (bool): True if in interactive mode, False if not.
    """
    # https://stackoverflow.com/questions/2356399/tell-if-python-is-in-interactive-mode
    return hasattr(sys, "ps1") or hasattr(sys, "ps2")
Check if user is running spaCy from an interactive Python
    shell. Will return True in Jupyter notebooks too.
    RETURNS (bool): True if in interactive mode, False if not.
    
spacy/util.py