LoadPlugin breaks live console display in Python
When rendering ParaView frames in a Python script I would like to display a progress bar. For some reason the LoadPlugin
function breaks the progress bar display. Does anyone have an idea what might be happening there? Here's a script to reproduce the issue:
import paraview.simple as pv
import rich.progress
import time
# This line breaks the live console display, even when test_plugin.py is empty
pv.LoadPlugin('test_plugin.py')
# Show a progress bar as an example for a live console display
while True:
for i in rich.progress.track(range(10)):
time.sleep(1)
Here I have installed rich
in a Python environment and set the PYTHONPATH
to access it. The progress bar works fine without the LoadPlugin
line. Does Edit: This code seems to redirect stdout and produce the issue:LoadPlugin
affect console display in any way? Or does any of the plugins that's loaded by default?
Not sure what to make of that yet. Any ideas?
Edited by Nils Vu