Skip to content

Commit 4f48cc8

Browse files
committed
Improve docs for Python support
1 parent f4f246d commit 4f48cc8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/reference/antora/modules/ROOT/pages/scripting.adoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,11 +298,10 @@ The JSR223 engine implementation for JavaScript, removed from Java by itself, ha
298298
See more information about enabling JavaScript support in GraalVM and what https://www.graalvm.org/latest/reference-manual/js/[configuration options] can be propagated via script variables.
299299
In particular, an `org.graalvm.polyglot:js` dependency has to be added to the target project to support JavaScript.
300300

301-
302301
Starting with version 6.4, the Python scripts support has been migrated to GraalVM Polyglot as well.
303302
Now these scripts can be written in Python 3.x and can use third-party libraries.
304303
See https://www.graalvm.org/latest/reference-manual/python/[GraalPy] documentation for more information.
305-
In particular, an `rg.graalvm.polyglot:python` dependency has to be added to the target project to support JavaScript.
304+
In particular, an `rg.graalvm.polyglot:python` dependency has to be added to the target project to support Python.
306305

307306
By default, the framework sets `allowAllAccess` to `true` on the shared Polyglot `Context` which enables this interaction with host JVM:
308307

@@ -315,4 +314,7 @@ By default, the framework sets `allowAllAccess` to `true` on the shared Polyglot
315314
* The creation and use of new sub-processes.
316315
* The access to process environment variables.
317316

318-
This can be customized via overloaded `PolyglotScriptExecutor` constructor which accepts a `org.graalvm.polyglot.Context.Builder`.
317+
This can be customized via overloaded `PolyglotScriptExecutor` constructor which accepts a `org.graalvm.polyglot.Context.Builder`.
318+
For example, the Jython-based scripts still can be executed with an `option("python.EmulateJython", "true")`.
319+
However, it is recommended to migrate to GraalPy altogether for better interpretation performance.
320+
Therefore, `import` for Java classes does not work anymore, instead `import java` has to be used and its `java.type()` function, respectively.

0 commit comments

Comments
 (0)