Console - Amourspirit/live-libreoffice-python GitHub Wiki

In Line Console

There is a console built in that can be accessed by simply typing console in the command line. This will open a console that will allow you to run python code in the context of the current document. This is useful for debugging and testing.

Starting the console:

$ console
Entering LibreOffice Python Console.

XSCRIPTCONTEXT is available as XSCRIPTCONTEXT.

To leave the console, press Ctrl+Z or type exit().

Tab Completion is available for objects.
For example: XSCRIPTCONTEXT. + TAB TAB will show all available methods.

Try: X + TAB

OooDev CLI Help is available as odh() function.
Example: odh("-s Write.append")
run odh('-h') for more options.

>>> 

Tab Completion

Tab completion is available in the console. This is useful for exploring the objects available in the current context and for any objects that are imported.

Help

OooDev CLI Help is available in the console as odh() function. This is useful for getting help within the console for OooDev online help.

Also a second terminal can opened and the help can be launched in the development environment and the odh command line tool can be used from there.

See Also: