Python scripts may run either
(1) inside the LO process, the usual mode
(2) as a client of a LO server
using a pipe or a socket.
The LO command is started with
an "--accept" argument.
The benefit of (2) is the freedom to
choose his/her preferred IDE to edit
and debug the script. The drawback is the
reference to the pipe/socket in the
script source code.
APSO is the best (only ?) choice for debugging (1).
With this commit, when no reference is given
to a pipe or a socket in the user script,
ScriptForge tries a connection through the
default pipe 'PIPE2LIBREOFFICE'.
If the connection fails, mode (1) is assumed.
The benefit is that the same source code
can run without change in both (1) and (2)
modes.
The command to run LO must refer explicitly
to the default pipe when (2) is wanted.
The change has no effect on existing Python
scripts.
Change-Id: I3176f4744ffea5b387280e9364b3563483fd14f0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205228
Reviewed-by: Jean-Pierre Ledure <jp@ledure.be>
Tested-by: Jenkins