I can confirm that in 0.19 it doesn't work because the "Console" observer is not instantiated when loading FreeCAD as Python module. This once was fixed with git commit 377b01b4b4ab. So, the minimum version you need is 0.20I have tested it with the current developer version, not with 0.19. I will have a look...
import FreeCAD disables output globally?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: import FreeCAD disables output globally?
Re: import FreeCAD disables output globally?
That fixed it, thanks a lot! The only thing that doesn't appear to be reset is the text color. This isn't a dealbreaker, but if you have an idea to reset that to Python's default, that would be fantastic!wmayer wrote: ↑Fri Dec 09, 2022 10:47 amI can confirm that in 0.19 it doesn't work because the "Console" observer is not instantiated when loading FreeCAD as Python module. This once was fixed with git commit 377b01b4b4ab. So, the minimum version you need is 0.20I have tested it with the current developer version, not with 0.19. I will have a look...
Re: import FreeCAD disables output globally?
Look here: https://github.com/FreeCAD/FreeCAD/blob ... e.cpp#L811
whenever printing a log message, warning or error message a special escape sequence is sent before and after the message. So, all what you have to do is disabling them in line 811, 821, 832, 842, 853 and 863.