You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: bundles/org.openhab.automation.pythonscripting/README.md
+11-19Lines changed: 11 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,29 +70,21 @@ Additionally, you can configure the Add-on via a config file `/openhab/services/
70
70
If you use the marketplace version of this Add-on, it is necessary to use the config file. OpenHAB has a bug which prevents the web based config dialog to work correctly for `kar` file based Add-ons.
71
71
:::
72
72
73
-
```text
74
-
# Use scope and import wrapper
75
-
#
76
-
# This enables a scope module and and import wrapper.
77
-
# A scope module is an encapsulated module containing all openHAB jsr223 objects and can be imported with <code>import scope</code>
78
-
# Additionally you can run an import like <code>from org.openhab.core import OpenHAB</code>
73
+
```ini
74
+
# Activate openHAB Python helper module and inject scope and helper objects into rules
Copy file name to clipboardExpand all lines: bundles/org.openhab.automation.pythonscripting/src/main/java/org/openhab/automation/pythonscripting/internal/PythonScriptEngine.java
Copy file name to clipboardExpand all lines: bundles/org.openhab.automation.pythonscripting/src/main/java/org/openhab/automation/pythonscripting/internal/PythonScriptEngineConfiguration.java
+21-22Lines changed: 21 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -62,15 +62,14 @@ public class PythonScriptEngineConfiguration {
<label>Activate openHAB Python helper module and inject scope and helper objects into rules.</label>
21
21
<description><![CDATA[
22
-
This enables a scope module and import wrapper.<br>
23
-
A scope module is an encapsulated module containing all openHAB jsr223 objects and can be imported with <code>import scope</code><br>
24
-
Additionally, you can run an import like <code>from org.openhab.core import openHAB</code>
22
+
Install openHAB Python helper module to support helper classes like rule, logger, Registry, Timer, etc. and automatically injects `from openhab import rule, Registry, logger` into you Python code.<br>
23
+
If auto injection is disabled, the helper module can still be used by importing it manually.<br>
24
+
When completely disabled, you get a "pure" Graalpy context that has only been initialized with the default JSR223 presets. The openHAB Python helper module cannot be imported manually in this case.
0 commit comments