MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / from_subprocess

Method from_subprocess

tools/python-3.11.9-amd64/Lib/platform.py:753–769  ·  view source on GitHub ↗

Fall back to `uname -p`

()

Source from the content-addressed store, hash-verified

751 return 'Alpha' if cpu_number >= 128 else 'VAX'
752
753 def from_subprocess():
754 """
755 Fall back to `uname -p`
756 """
757 try:
758 import subprocess
759 except ImportError:
760 return None
761 try:
762 return subprocess.check_output(
763 ['uname', '-p'],
764 stderr=subprocess.DEVNULL,
765 text=True,
766 encoding="utf8",
767 ).strip()
768 except (OSError, subprocess.CalledProcessError):
769 pass
770
771
772def _unknown_as_blank(val):

Callers

nothing calls this directly

Calls 2

stripMethod · 0.80
check_outputMethod · 0.80

Tested by

no test coverage detected