observation about running a python script #2275
Replies: 1 comment 2 replies
-
There are definitely some issues with window management and application lifetime in “quasi-headless” mode which is how you’re using it (the -x flag). I will look into those this milestone. As a workaround, you can build SCIRun as a completely headless app, with console-only interaction, and that will take care of the spurious windows appearing while running scripts. The idea is you can fine-tune your scripts in GUI mode, then when it’s time to run them in production, use the full headless version which can be run safely in the background or on a remote server. The way to do this is to make a brand new binary folder, and turn on BUILD_HEADLESS in CMake at the Superbuild level. Once that is built, you can run scripts the same way with the -s/-S flag, or run interactively with a python shell using -i. This method is still somewhat experimental, so you might run into different issues, but please let me know if you do. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have been running some python scripts under scirun5 (Mac OS 11.3, SCIRun5 beta Y + Qt5.14.1) using the commandline command
% scirun -x -S script.py
I was wondering why it was necessary for a blank scirun window to appear during the execution of the script. This appears to serve no purpose as it is just a blank white window.
My main issue is that when I run these scripts as part of a larger script file, I cannot use the computer for fear of affecting or interrupting this window using a keyboard command.
Any thoughts would be most welcome.
Thanks,
Peter.
Beta Was this translation helpful? Give feedback.
All reactions