This integrates a custom GUI event loop to be able to run polyscope asynchronously in a jupyter notebook.
pip install git+https://github.com/ugogon/interactive_polyscope.gitimport polyscope as ps
import interactive_polyscope
%gui polyscope
ps.show()
#other commandsThe important thing is the %gui polyscope magic command. It runs a custom event loop that handles the jupyter kernel REPL and the polyscope event loop.