INNER CODE UNIT · Python
_yes
TauricResearch/TradingAgents · cli/run.py:392
def _yes(question: str) -> bool:
return typer.prompt(question, default="Y").strip().upper() in ("Y", "YES", "")
def _graphical_browser():
"""A browser that opens a page in its own window on this machine, or None.
Over SSH the page sits on the remote machine, and a terminal browser (lynx,
w3m, elinks) would take over the terminal, so neither is offered.
"""
if os.environ.get("SSH_CONNECTION") or os.environ.get("SSH_TTY"):
return None
try:
browser = webbrowser.get()
except webbrowser.Error:
return None
if type(browser) is webbrowser.GenericBrowser or isinstance(browser, webbrowser.Elinks):
return None