Mar-21-2019, 06:58 AM
Python 3.7.2, Eclipse 12/2018
In order for the interface to work in the program, I create a new process and start the heavy procedure in it. But when I debugging program it is not suitable and in this case I do everything in the Python process. Therefore, in the code I need to find out, in which mode the application was launched. I tried to use the construct:
How can I recognize debug or run mode?
In order for the interface to work in the program, I create a new process and start the heavy procedure in it. But when I debugging program it is not suitable and in this case I do everything in the Python process. Therefore, in the code I need to find out, in which mode the application was launched. I tried to use the construct:
if __debug__: print 'Debug ON' else: print 'Debug OFF', but it always comes into the debug branch.
How can I recognize debug or run mode?