I'm unable to capture stdout of runpy.run_module into a variable using StringIO. To demonstrate the problem, I created a script called runpy_test.py (code below
ssas-2012
scxml
ncron
file-icons
jsonlite
hiveserver2
rfc1034identifier
gcp-secrets-manager
aws-iot
run-length-encoding
react-image-crop
cors
pingfederate
hspi
subgraph
disabled-control
mage
triangle
system32
azurekinect
hexavigesimal
iup
point-to-point
django-2.1
kernel-module
ancestor
blend-mode
gige-sdk
ng-zorro-antd
anko