Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
"""Observe the stdout redirected from sub thread to main thread through shared StringIO instance"""
import time
import contextlib
from concurrent.futures import ThreadPoolExecutor
from io import StringIO
import streamlit as st