m2m模型翻译
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
972 B

6 months ago
  1. import os
  2. import platform
  3. from pip._vendor.rich import inspect
  4. from pip._vendor.rich.console import Console, get_windows_console_features
  5. from pip._vendor.rich.panel import Panel
  6. from pip._vendor.rich.pretty import Pretty
  7. def report() -> None: # pragma: no cover
  8. """Print a report to the terminal with debugging information"""
  9. console = Console()
  10. inspect(console)
  11. features = get_windows_console_features()
  12. inspect(features)
  13. env_names = (
  14. "TERM",
  15. "COLORTERM",
  16. "CLICOLOR",
  17. "NO_COLOR",
  18. "TERM_PROGRAM",
  19. "COLUMNS",
  20. "LINES",
  21. "JUPYTER_COLUMNS",
  22. "JUPYTER_LINES",
  23. "JPY_PARENT_PID",
  24. "VSCODE_VERBOSE_LOGGING",
  25. )
  26. env = {name: os.getenv(name) for name in env_names}
  27. console.print(Panel.fit((Pretty(env)), title="[b]Environment Variables"))
  28. console.print(f'platform="{platform.system()}"')
  29. if __name__ == "__main__": # pragma: no cover
  30. report()