From 68e39672b4fdc9719f2e0a85e83f2d6fff6c180c Mon Sep 17 00:00:00 2001 From: Alain Romedenne Date: Thu, 16 Jun 2022 07:59:21 +0200 Subject: Toc update to document Python resources Python modules deserve to be highlited: - scriptforge - uno - msgbox Change-Id: I6d0cad668527b17b1f3ca898d5001768cb30a318 Reviewed-on: https://gerrit.libreoffice.org/c/help/+/135947 Tested-by: Jenkins Reviewed-by: Alain Romedenne --- source/auxiliary/sbasic.tree | 5 +++++ source/text/sbasic/python/main0000.xhp | 5 +++++ source/text/sbasic/python/python_screen.xhp | 7 +++---- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree index bca59567b3..3cffcd46ff 100644 --- a/source/auxiliary/sbasic.tree +++ b/source/auxiliary/sbasic.tree @@ -402,6 +402,11 @@ Python Programming Examples Calling Basic Macros from Python + + scriptforge module + uno module + msgbox module + Object Inspector diff --git a/source/text/sbasic/python/main0000.xhp b/source/text/sbasic/python/main0000.xhp index e84d9b2d37..fe47d7502f 100644 --- a/source/text/sbasic/python/main0000.xhp +++ b/source/text/sbasic/python/main0000.xhp @@ -40,6 +40,11 @@ + +

%PRODUCTNAME Python Modules

+ scriptforge module + msgbox module + diff --git a/source/text/sbasic/python/python_screen.xhp b/source/text/sbasic/python/python_screen.xhp index b88fa923af..a40c6bc793 100644 --- a/source/text/sbasic/python/python_screen.xhp +++ b/source/text/sbasic/python/python_screen.xhp @@ -24,7 +24,7 @@

Input/Output to Screen

Python standard output file is not available when running Python macros from Tools – Macros - Run Macro... menu. Presenting the output of a module requires the Python interactive console. Features such as input(), print(), repr() and str() are available from the Python shell. - The Alternative Python Script Organizer (APSO) extension offers a msgbox() function out of its apso_utils module. + %PRODUCTNAME msgbox Python module proposes a msgbox() method that is illustrated in Creating Event Listeners and Creating a dialog handler example pages. %PRODUCTNAME Basic proposes InputBox(), Msgbox() and Print() screen I/O functions. Python alternatives exist relying either on %PRODUCTNAME API Abstract Windowing Toolkit, either on Python to Basic function calls. The latter proposes a syntax that is intentionally close to that of Basic, and uses a Python module next to a Basic module. The API Scripting Framework is used to perform Basic, BeanShell, JavaScript and Python inter-languages function calls.

Python syntax:

MsgBox(txt, buttons=0, title=None)
@@ -80,6 +80,7 @@ xScript = scriptPro.getScript(scriptName) return xScript + MsgBox and InputBox methods from the Basic service included in the ScriptForge libraries call directly their native Basic counterparts.

uiScripts Basic module

Option Explicit @@ -95,10 +96,8 @@ Print msg End Sub + The Alternative Python Script Organizer (APSO) extension offers a msgbox() function out of its apso_utils module.
- -- cgit