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

Function execute

tools/python-3.11.9-amd64/Tools/demo/rpythond.py:40–53  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

38 conn.send(reply.encode())
39
40def execute(request):
41 stdout = sys.stdout
42 stderr = sys.stderr
43 sys.stdout = sys.stderr = fakefile = io.StringIO()
44 try:
45 try:
46 exec(request, {}, {})
47 except:
48 print()
49 traceback.print_exc(100)
50 finally:
51 sys.stderr = stderr
52 sys.stdout = stdout
53 return fakefile.getvalue()
54
55try:
56 main()

Callers 1

mainFunction · 0.70

Calls 3

getvalueMethod · 0.95
print_excMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected