On 13/08/2019 17:41, Jean-Pierre Ledure (via logerrit) wrote:
New commits:
commit f8d6c00d4c6d2e5f63dc660069c858bdc8affec6
Author: Jean-Pierre Ledure <jp@xxxxxxxxx>
AuthorDate: Tue Aug 13 17:36:10 2019 +0200
Commit: Jean-Pierre Ledure <jp@xxxxxxxxx>
CommitDate: Tue Aug 13 17:41:16 2019 +0200
Access2Base - Support API from Python
access2base.py if the Python wrapper to be imported
in user scripts.
Make file adapted to copy access2base.py in $INSTDIR/program directory
File can be found by user scripts on PYTHONPATH
Change-Id: Icb62f76d6e9df1110b70471178127c60a4dd46d0
[...]
diff --git a/wizards/source/access2base/access2base.py b/wizards/source/access2base/access2base.py
new file mode 100644
index 000000000000..ce20e70e210a
--- /dev/null
+++ b/wizards/source/access2base/access2base.py
@@ -0,0 +1,1448 @@
+#!/usr/bin/python
Seeing follow-up
<https://gerrit.libreoffice.org/plugins/gitiles/core/+/36432802bc955bed05fb87bef8053bd3b06411f0%5E!/>
"fix shebang of wizards/source/access2base/access2base.py": Does it
even make sense to have a shebang line, so that it can be executed
directly? The docstring below suggests that it should be imported as a
Python library, so wouldn't need one?
+# -*- coding: utf-8 -*-
+
+# Copyright 2012-2020 Jean-Pierre LEDURE
+
+# =====================================================================================================================
+# === The Access2Base library is a part of the LibreOffice project. ===
+# === Full documentation is available on http://www.access2base.com ===
+# =====================================================================================================================
+
+# Access2Base is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# Access2Base is free software; you can redistribute it and/or modify it under the terms of either (at your option):
+
+# 1) The Mozilla Public License, v. 2.0. If a copy of the MPL was not
+# distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/ .
+
+# 2) The GNU Lesser General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version. If a copy of the LGPL was not
+# distributed with this file, see http://www.gnu.org/licenses/ .
+
+"""
+The access2base.py module implements an interface between Python (user) scripts and the Access2Base Basic library.
+
+Usage:
+ from access2base import *
+Additionally, if Python and LibreOffice are started in separate processes:
+ If LibreOffice started from console ... (example for Linux)
+ ./soffice --accept='socket,host=localhost,port=2019;urp;'
+ then insert next statement
+ A2BConnect(hostname = 'localhost', port = 2019)
+
+Specific documentation about Access2Base and Python:
+ http://www.access2base.com/access2base.html#%5B%5BAccess2Base%20and_Python%5D%5D
Btw, <http://www.access2base.com> mentioned above doesn't appear to
provide information about access2base.py; it offers a search
functionality, but searching for neither "access2base.py" nor "python"
finds anything. The link
<http://www.access2base.com/access2base.html#%5B%5BAccess2Base%20and_Python%5D%5D>
mentioned here has a stale fragment.
_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice