From: Simon D. <ha...@si...> - 2023-06-15 17:39:59
|
I am currently working on a plugin for PyMol that should continuously add new structures to the PyMol view while the function is running. This is some demo code: import time from pymol import cmd @cmd.extend def custom_function(inp): for i in range(len(inp)): time.sleep(2) print(i) # here we would load the structures However, this doesn't work. It prints in the system console just in time but not in the Pymol console (and if I call e.g cmd.load("somepdb") also the structure doesn't get added to the view) until the function has completed running. Is there a way around this ? Thanks, Simon *Simon Dürr* in...@si... https://simonduerr.eu |