MCPcopy
hub / github.com/ArchiveBox/ArchiveBox / stdout

Function stdout

archivebox/config.py:794–802  ·  view source on GitHub ↗
(*args, color: Optional[str]=None, prefix: str='', config: Optional[ConfigDict]=None)

Source from the content-addressed store, hash-verified

792
793# Logging Helpers
794def stdout(*args, color: Optional[str]=None, prefix: str='', config: Optional[ConfigDict]=None) -> None:
795 ansi = DEFAULT_CLI_COLORS if (config or {}).get('USE_COLOR') else ANSI
796
797 if color:
798 strs = [ansi[color], ' '.join(str(a) for a in args), ansi['reset'], '\n']
799 else:
800 strs = [' '.join(str(a) for a in args), '\n']
801
802 sys.stdout.write(prefix + ''.join(strs))
803
804def stderr(*args, color: Optional[str]=None, prefix: str='', config: Optional[ConfigDict]=None) -> None:
805 ansi = DEFAULT_CLI_COLORS if (config or {}).get('USE_COLOR') else ANSI

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected