Source code for afnio.tellurio.consent

import json
import os
import sys

from afnio.tellurio.utils import get_config_path

YELLOW = "\033[93m"
RESET = "\033[0m"






def _is_interactive():
    """Return True if running in a TTY or Jupyter notebook."""
    try:
        # Jupyter notebook or IPython
        from IPython import get_ipython

        if get_ipython():
            return True
    except ImportError:
        pass
    # Fallback to TTY check
    return sys.stdin.isatty()