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
| `null` | `null` is like `None`. Important to know: interop `null` values are all identical to `None`. JavaScript defines two "null-like" values; `undefined` and `null`, which are *not* identical, but when passed to Python, they are treated so. |
205
206
| `boolean` | `boolean` behaves like Python booleans, including the fact that in Python, all booleans are also integers (1 and 0 for true and false, respectively). |
206
207
| `number` | `number` Behaves like Python numbers. Python only has one integer and one floating point type, but ranges are imported in some places such as typed arrays. |
@@ -214,12 +215,12 @@ Types not listed in the table below have no special interpretation in Python.
214
215
|`exception`| An `exception` can be caught in a generic `except` clause. |
215
216
|`MetaObject`| Meta objects can be used in subtype and `isinstance` checks. |
216
217
|`executable`| An `executable` object can be executed as a function, but never with keyword arguments. |
217
-
| `instantiable` | An `instantiable` object can be called just like a Python type, but never with keyword arguments. |
218
-
| | |
218
+
| `instantiable` | An `instantiable` object can be called just like a Python type, but never with keyword arguments. |
Copy file name to clipboardExpand all lines: docs/user/Python-Runtime.md
+15-16Lines changed: 15 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,10 +22,9 @@ GraalPy provides the following capabilities:
22
22
23
23
### GraalPy Distributions
24
24
25
-
GraalPy is available as **Oracle GraalPy** and **GraalPy Community**.
25
+
GraalPy is available as **GraalPy built on Oracle GraalVM** and **GraalPy Community**.
26
26
27
-
* Oracle GraalPy provides the best experience: it comes with additional optimizations, is significantly faster and more memory-efficient.
28
-
Oracle GraalPy is built on top of Oracle GraalVM, and is licensed under the [GraalVM Free Terms and Conditions (GFTC)](https://www.oracle.com/downloads/licenses/graal-free-license.html) license, which permits use by any user including commercial and production use.
27
+
* GraalPy built on top of Oracle GraalVM provides the best experience: it comes with additional optimizations, is significantly faster and more memory-efficient. It is licensed under the [GraalVM Free Terms and Conditions (GFTC)](https://www.oracle.com/downloads/licenses/graal-free-license.html) license, same as Oracle GraalVM, which permits use by any user including commercial and production use.
29
28
Redistribution is permitted as long as it is not for a fee.
30
29
31
30
* GraalPy Community is built on top of GraalVM Community Edition, and is fully open-source.
@@ -76,13 +75,14 @@ The four GraalPy runtimes are identified as follows, using the general pattern _
76
75
### Linux
77
76
78
77
The easiest way to install GraalPy on Linux is to use [Pyenv](https://github.com/pyenv/pyenv) (the Python version manager).
79
-
To install version 23.1.2 using Pyenv, run the following commands:
78
+
To install version 24.0.0 using Pyenv, run the following commands:
80
79
```bash
81
-
pyenv install graalpy-23.1.2
80
+
pyenv install graalpy-24.0.0
82
81
```
83
82
```bash
84
-
pyenv shell graalpy-23.1.2
83
+
pyenv shell graalpy-24.0.0
85
84
```
85
+
> Before running `pyenv install`, you may need to update `pyenv` to include the latest GraalPy versions.
86
86
87
87
Alternatively, you can download a compressed GraalPy installation file from [GitHub releases](https://github.com/oracle/graalpython/releases).
88
88
@@ -92,13 +92,15 @@ Alternatively, you can download a compressed GraalPy installation file from [Git
92
92
### macOS
93
93
94
94
The easiest way to install GraalPy on macOS is to use [Pyenv](https://github.com/pyenv/pyenv) (the Python version manager).
95
-
To install version 23.1.2 using Pyenv, run the following commands:
95
+
To install version 24.0.0 using Pyenv, run the following commands:
96
96
```bash
97
-
pyenv install graalpy-23.1.2
97
+
pyenv install graalpy-24.0.0
98
98
```
99
99
```bash
100
-
pyenv shell graalpy-23.1.2
100
+
pyenv shell graalpy-24.0.0
101
101
```
102
+
> Before running `pyenv install`, you may need to update `pyenv` to include the latest GraalPy versions.
103
+
102
104
Alternatively, you can download a compressed GraalPy installation file from [GitHub releases](https://github.com/oracle/graalpython/releases).
103
105
104
106
1. Find the download that matches the pattern _graalpy-XX.Y.Z-macos-amd64.tar.gz_ or _graalpy-XX.Y.Z-macos-aarch64.tar.gz_ (depending on your platform) and download.
@@ -108,7 +110,7 @@ Alternatively, you can download a compressed GraalPy installation file from [Git
3. Uncompress the file and update your `PATH` environment variable to include to the _graalpy-XX.Y.Z-macos-amd64/bin_ (or _graalpy-XX.Y.Z-macos-aarch64/bin_) directory.
114
116
@@ -143,7 +145,7 @@ This generates wrapper scripts and makes the implementation usable from a shell
143
145
```
144
146
For example:
145
147
```bash
146
-
graalpy -m venv ~/.virtualenvs/graalpy-23.1.2
148
+
graalpy -m venv ~/.virtualenvs/graalpy-24.0.0
147
149
```
148
150
149
151
2. Activate the environment in your shell session:
@@ -152,15 +154,12 @@ This generates wrapper scripts and makes the implementation usable from a shell
152
154
```
153
155
For example:
154
156
```bash
155
-
source ~/.virtualenvs/graalpy-23.1.2/bin/activate
157
+
source ~/.virtualenvs/graalpy-24.0.0/bin/activate
156
158
```
157
159
158
160
Multiple executables are available in the virtual environment, including: `python`, `python3`, and `graalpy`.
159
161
160
-
> Note: To deactivate the Python environment (and return to your shell), use the following command:
161
-
```bash
162
-
deactivate
163
-
```
162
+
> Note: To deactivate the Python environment (and return to your shell), run `deactivate`.
164
163
165
164
The `pip` package installer is available when using a virtual environment.
166
165
The GraalPy implementation of `pip` may choose package versions other than the latest in cases where it ships patches to make these work better.
Copy file name to clipboardExpand all lines: docs/user/Python-Standalone-Applications.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The [Truffle framework](https://github.com/oracle/graal/tree/master/truffle) on
14
14
GraalPy includes a module named `standalone` to create a Python binary for Linux, macOS, and Windows.
15
15
The modules bundles all your application's resources into a single file.
16
16
17
-
> Note: **Prerequisite** GraalPy distribution beginning with version 23.1.0. See [GraalPy releases](https://github.com/oracle/graalpython/releases).
17
+
> Prerequisite: GraalPy distribution beginning with version 23.1.0. See [GraalPy releases](https://github.com/oracle/graalpython/releases).
18
18
19
19
For example, if you want to produce a native executable from a Python file named _my\_script.py_ along with packages you have installed in a virtual environment named _my\_venv_, run the following command:
Copy file name to clipboardExpand all lines: docs/user/README.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,18 +67,19 @@ The Java code and the _pom.xml_ file are heavily documented and the generated co
67
67
68
68
2. Open your project configuration file, _app/build.gradle_, and modify it as follows.
69
69
- Include the GraalPy support and the [GraalVM SDK Polyglot API](https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/package-summary.html) in the `dependencies` section:
- We recommend you use the Java modules build. Add the appropriate plugin to the `plugins` section:
76
-
```kotlin
77
+
```
77
78
id("org.javamodularity.moduleplugin") version "1.8.12"
78
79
```
79
80
80
81
- To run the application as a module rather than from the classpath, edit the `application` section to look like this:
81
-
```kotlin
82
+
```
82
83
application {
83
84
mainClass.set("interop.App")
84
85
mainModule.set("interop")
@@ -113,8 +114,6 @@ The Java code and the _pom.xml_ file are heavily documented and the generated co
113
114
```
114
115
The application prints "Hello Python!" to the console.
115
116
116
-
<br>
117
-
118
117
> Note: The performance of the GraalPy runtime depends on the JDK in which you embed it. For more information, see [Runtime Optimization Support](https://www.graalvm.org/latest/reference-manual/embed-languages/#runtime-optimization-support).
0 commit comments