Hi @jollymon ,
I believe there is no direct way to do this. But maybe there are some workarounds though. You can try to read widgets in python and set those values as envrionment variables. Then you can use shell to read that variables. Something like below (except in python try to read widget value)
%python
import os
l =['A','B','C','D']
os.environ['LIST']=' '.join(l)print(os.getenv('LIST'))
%sh
for i in $LIST
do
echo $i
done