MCPcopy Create free account
hub / github.com/OpenGVLab/HumanBench / run_and_get

Function run_and_get

PATH/core/msg_server.py:86–97  ·  view source on GitHub ↗
(cmd, screen=False)

Source from the content-addressed store, hash-verified

84
85def itchat_manager():
86 def run_and_get(cmd, screen=False):
87 process = subprocess.Popen(
88 cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
89 output = ''
90
91 for line in process.stdout:
92 line = line.decode('utf-8')
93 if screen:
94 print(line, end='', flush=True)
95 output += line.strip(' ')
96
97 return output
98
99 @itchat.msg_register(itchat.content.TEXT)
100 def text_reply(msg):

Callers 1

text_replyFunction · 0.85

Calls 1

decodeMethod · 0.80

Tested by

no test coverage detected