Skip to content

2025 2 4 #173

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added docs/assets/images/pyeditor-stop.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/beginning-pyscript.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ module in the document's `<head>` tag:
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>🦜 Polyglot - Piratical PyScript</title>
<link rel="stylesheet" href="https://pyscript.net/releases/2025.2.3/core.css">
<script type="module" src="https://pyscript.net/releases/2025.2.3/core.js"></script>
<link rel="stylesheet" href="https://pyscript.net/releases/2025.2.4/core.css">
<script type="module" src="https://pyscript.net/releases/2025.2.4/core.js"></script>
</head>
<body>

Expand Down Expand Up @@ -168,8 +168,8 @@ In the end, our HTML should look like this:
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>🦜 Polyglot - Piratical PyScript</title>
<link rel="stylesheet" href="https://pyscript.net/releases/2025.2.3/core.css">
<script type="module" src="https://pyscript.net/releases/2025.2.3/core.js"></script>
<link rel="stylesheet" href="https://pyscript.net/releases/2025.2.4/core.css">
<script type="module" src="https://pyscript.net/releases/2025.2.4/core.js"></script>
</head>
<body>
<h1>Polyglot 🦜 💬 🇬🇧 ➡️ 🏴‍☠️</h1>
Expand Down
15 changes: 15 additions & 0 deletions docs/user-guide/editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,21 @@ The outcome of these code fragments should look something like this:

Hovering over the Python editor reveals the "run" button.

### Stop evaluation

Sometimes, for whatever reason, the fragment of code in the editor will never
complete. Perhaps it's stuck in an infinite loop and you need to stop the
evaluation of your code so you can fix the problem and start it again.

When the code is running, hovering over the editor will reveal a stop button
(where the run button was found). Click on it, confirm you want to stop your
code, and then the code will stop and the editor will refresh so you can fix
your code.

It looks something like this:

<img src="../../assets/images/pyeditor-stop.gif" style="border: 1px solid black; border-radius: 0.2rem; box-shadow: var(--md-shadow-z1);"/>

### Setup

Sometimes you need to create a pre-baked Pythonic context for a shared
Expand Down
2 changes: 1 addition & 1 deletion docs/user-guide/filesystem.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ PyScript interacts with two filesystems.

Access to the device's local filesystem **is only available in Chromium
based browsers**. The maximum capacity for files shared in this way is
4GB, and **if this size is exceeded may result in lost data**.
4GB.

Firefox and Safari do not support this capability (yet), and so it is not
available to PyScript running in these browsers.
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/first-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ CSS:
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!-- PyScript CSS -->
<link rel="stylesheet" href="https://pyscript.net/releases/2025.2.3/core.css">
<link rel="stylesheet" href="https://pyscript.net/releases/2025.2.4/core.css">
<!-- This script tag bootstraps PyScript -->
<script type="module" src="https://pyscript.net/releases/2025.2.3/core.js"></script>
<script type="module" src="https://pyscript.net/releases/2025.2.4/core.js"></script>
</head>
<body>
<!-- your code goes here... -->
Expand Down
10 changes: 5 additions & 5 deletions docs/user-guide/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ For example, this will work because all references are contained within the
registered function:

```js
import { hooks } from "https://pyscript.net/releases/2025.2.3/core.js";
import { hooks } from "https://pyscript.net/releases/2025.2.4/core.js";

hooks.worker.onReady.add(() => {
// NOT suggested, just an example!
Expand All @@ -114,7 +114,7 @@ hooks.worker.onReady.add(() => {
However, due to the outer reference to the variable `i`, this will fail:

```js
import { hooks } from "https://pyscript.net/releases/2025.2.3/core.js";
import { hooks } from "https://pyscript.net/releases/2025.2.4/core.js";

// NO NO NO NO NO! ☠️
let i = 0;
Expand Down Expand Up @@ -147,7 +147,7 @@ the page.

```js title="log.js - a plugin that simply logs to the console."
// import the hooks from PyScript first...
import { hooks } from "https://pyscript.net/releases/2025.2.3/core.js";
import { hooks } from "https://pyscript.net/releases/2025.2.4/core.js";

// The `hooks.main` attribute defines plugins that run on the main thread.
hooks.main.onReady.add((wrap, element) => {
Expand Down Expand Up @@ -197,8 +197,8 @@ hooks.worker.onAfterRun.add(() => {
<!-- JS plugins should be available before PyScript bootstraps -->
<script type="module" src="./log.js"></script>
<!-- PyScript -->
<link rel="stylesheet" href="https://pyscript.net/releases/2025.2.3/core.css">
<script type="module" src="https://pyscript.net/releases/2025.2.3/core.js"></script>
<link rel="stylesheet" href="https://pyscript.net/releases/2025.2.4/core.css">
<script type="module" src="https://pyscript.net/releases/2025.2.4/core.js"></script>
</head>
<body>
<script type="mpy">
Expand Down
4 changes: 2 additions & 2 deletions docs/user-guide/workers.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ Here's how:
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<!-- PyScript CSS -->
<link rel="stylesheet" href="https://pyscript.net/releases/2025.2.3/core.css">
<link rel="stylesheet" href="https://pyscript.net/releases/2025.2.4/core.css">
<!-- This script tag bootstraps PyScript -->
<script type="module" src="https://pyscript.net/releases/2025.2.3/core.js"></script>
<script type="module" src="https://pyscript.net/releases/2025.2.4/core.js"></script>
<title>PyWorker - mpy bootstrapping pyodide example</title>
<script type="mpy" src="main.py"></script>
</head>
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "2025.2.3"
"version": "2025.2.4"
}