I’m making a python program that provides a Tkinter GUI for the setup of some hardware, and I have a “debug mode” which uses the logging module to print some messages so that the user can see what the program is doing in greater detail.
When I run the program in an IDE (Geany) a console is opened and any logging messages are printed there, but if I run it from the file explorer, a console with the messages never opens. I have also tried running it from the terminal, in which case the messages are printed to the terminal window I used to run the program. Regular print() statements behave the same way.
It seemed like this may have something to do with python running buffered/unbuffered, so I tried changing the hashbang from:
#!/usr/bin/env python3
to:
#!/usr/bin/env -S python3 -u
as suggested by responses to this question, but that did not help.