MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / _command_version

Function _command_version

deeplabcut/core/debug/_debug_utils.py:70–87  ·  view source on GitHub ↗
(command: str, version_args: Sequence[str] = ("-version",))

Source from the content-addressed store, hash-verified

68
69
70def _command_version(command: str, version_args: Sequence[str] = ("-version",)) -> str:
71 try:
72 completed = subprocess.run(
73 [command, *version_args],
74 check=False,
75 capture_output=True,
76 text=True,
77 timeout=3,
78 )
79 except Exception:
80 return "unavailable"
81
82 text = (completed.stdout or completed.stderr or "").strip()
83 if not text:
84 return "unavailable"
85
86 first_line = text.splitlines()[0].strip()
87 return first_line or "unavailable"

Callers 1

Calls 1

runMethod · 0.45

Tested by

no test coverage detected