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
date
zfit
xml2js
react-native-voice
gremlinjs
android-app-watermark
googleauthr
minitab
agdk
qabstracttablemodel
semihosting
wxpython
react-native-sensors
wifip2p
infobip-api
dyalog
unrecognized-selector
tree
address-bar
hmacsha512
abcpdf9
outputcache
singleton-type
ruby-on-rails-5
aws-networking
transparentproxy
ask-sdk
mvcc
spark-window-function
critical-css