Previous behavior: After a PythonShell() statement that opened the APSO shell console, subsequent print() statements executed in the same macro run were not displayed in the console. They were only from a next macro run. Solution: Force a brief suspension of the Python process by inserting a call to a Basic routine (IPC) immediately after the launch of the shell console. Result: The redirection of STDOUT and STDERR happens normally inside the APSO code, as expected. Change-Id: Ifbf267a898d45a97c346f0f3ea824edd4e6045ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115930 Tested-by: Jean-Pierre Ledure <jp@ledure.be> Tested-by: Jenkins Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>