Skip to content
Open
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
1 change: 1 addition & 0 deletions 11a7f54ede6ebe4f809bce13cc034aef.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11a7f54ede6ebe4f809bce13cc034aef
17 changes: 12 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# Pytml 2.5.1
# Pytml 2.6.0

- Supports inline Python on `file://` pages while keeping Pyodide on HTTPS.
- Loads Pyodide only when a page contains Python blocks.
- Gives a clear error for relative local Python `src` files under `file://`.
- Improves async callbacks, timer handling, and HTML escaping.
- Keeps Pyodide `314.0.7` as the runtime.
- Injects the `pytml` helper module at startup.
- Embeds `pytml.game` (Game Kit) and compiles it lazily on first use.
- Updates multilingual READMEs and the main website copy for the 2.6 release.

Changelog

## 2.6.0 — 2026-11-29

- Kept Pyodide `314.0.7` as the runtime in Pytml 2.6.
- Injected the `pytml` helper module during startup.
- Embedded the Game Kit as `pytml.game` with lazy first-use compilation.
- Updated README files (EN/DE/JA/ZH) and website metadata/content to reflect 2.6.

## 2.5.1 — 2026-10-19

- Added inline Python support for `file://` pages and clearer errors for local Python `src` files.
Expand Down
24 changes: 0 additions & 24 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -173,29 +173,5 @@
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2026 Aswanth R(NodeX-AR)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@

**Run Python in your browser with zero configuration — no server, just a script tag.**

Pytml 2.5 is a lightweight JavaScript bridge built on **Pyodide 314.0.7**. Write Python inside HTML, interact with ordinary DOM elements, and use the small numbered UI syntax supported by the 2.5 runtime.
Pytml 2.6 is a lightweight JavaScript bridge built on **Pyodide 314.0.7**. Write Python inside HTML, interact with ordinary DOM elements, and use the small numbered UI syntax supported by the 2.6 runtime.
Pytml 2.6 also injects the `pytml` helper module at startup, and embeds the Game Kit (`pytml.game`) so it compiles lazily on first use.

> **Official Pyodide Related Project. Thank you to the Pyodide team for the support!**
> **Featured in [Python Weekly Issue 772](https://www.pythonweekly.com/p/python-weekly-issue-772-november-19-2026)!**
Expand All @@ -37,9 +38,9 @@ print(f"Hi {name}!")
</py>
```

## Pytml 2.5 UI Syntax
## Pytml 2.6 UI Syntax

Inside a `<pyN>` block, Pytml 2.5 recognizes numbered UI tags such as:
Inside a `<pyN>` block, Pytml 2.6 recognizes numbered UI tags such as:

```html
<py1>
Expand Down
7 changes: 4 additions & 3 deletions README_de.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@

**Python im Browser ausführen – ohne Konfiguration, ohne Server, nur ein Script-Tag.**

Pytml 2.5 ist eine leichtgewichtige JavaScript-Brücke auf Basis von **Pyodide 314.0.7**. Schreiben Sie Python direkt in HTML, arbeiten Sie mit gewöhnlichen DOM-Elementen und nutzen Sie die kleine nummerierte UI-Syntax, die die 2.5-Laufzeitumgebung unterstützt.
Pytml 2.6 ist eine leichtgewichtige JavaScript-Brücke auf Basis von **Pyodide 314.0.7**. Schreiben Sie Python direkt in HTML, arbeiten Sie mit gewöhnlichen DOM-Elementen und nutzen Sie die kleine nummerierte UI-Syntax, die die 2.6-Laufzeitumgebung unterstützt.
Pytml 2.6 injiziert beim Start außerdem automatisch das Hilfsmodul `pytml`; das Game Kit (`pytml.game`) ist eingebettet und wird bei der ersten Nutzung lazy kompiliert.

> **Offizielles Pyodide-Related-Project. Vielen Dank an das Pyodide-Team für die Unterstützung!**
> **Vorgestellt in [Python Weekly Ausgabe 772](https://www.pythonweekly.com/p/python-weekly-issue-772-november-19-2026)!**
Expand All @@ -42,9 +43,9 @@ print(f"Hi {name}!")

Der Inhalt des `<py>`-Tags wird als Python-Code ausgeführt. Die Ausgabe von `print()` wird auf der Seite angezeigt, und `input()` funktioniert als Eingabe im Browser.

## Pytml-2.5-UI-Syntax
## Pytml-2.6-UI-Syntax

Innerhalb eines `<pyN>`-Blocks (z. B. `<py1>`, `<py2>`) erkennt Pytml 2.5 nummerierte UI-Tags wie diese:
Innerhalb eines `<pyN>`-Blocks (z. B. `<py1>`, `<py2>`) erkennt Pytml 2.6 nummerierte UI-Tags wie diese:

```html
<py1>
Expand Down
7 changes: 4 additions & 3 deletions README_ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

**設定不要でブラウザ上でPythonを実行 ― サーバーは不要、scriptタグ1行だけです。**

Pytml 2.5は、**Pyodide 314.0.7** をベースにした軽量なJavaScriptブリッジです。HTMLの中にPythonを書き、通常のDOM要素を操作でき、2.5ランタイムが対応する番号付きの簡易UI構文も使えます。
Pytml 2.6は、**Pyodide 314.0.7** をベースにした軽量なJavaScriptブリッジです。HTMLの中にPythonを書き、通常のDOM要素を操作でき、2.6ランタイムが対応する番号付きの簡易UI構文も使えます。
Pytml 2.6では起動時に `pytml` ヘルパーモジュールが自動注入され、Game Kit(`pytml.game`)は埋め込み済みで初回利用時に遅延コンパイルされます。

> **Pyodide公式の関連プロジェクトです。サポートしてくださったPyodideチームに感謝します。**
> **Ditampilake ing [Python Weekly Edisi 772](https://www.pythonweekly.com/p/python-weekly-issue-772-november-19-2026)!**
Expand All @@ -41,9 +42,9 @@ print(f"Hi {name}!")

`<py>` タグの中がPythonコードとして実行されます。`print()` の出力は画面に表示され、`input()` はブラウザ上の入力として動作します。

## Pytml 2.5 のUI構文
## Pytml 2.6 のUI構文

`<pyN>` ブロック(`<py1>`、`<py2>` など)の中では、Pytml 2.5は次のような番号付きUIタグを認識します。
`<pyN>` ブロック(`<py1>`、`<py2>` など)の中では、Pytml 2.6は次のような番号付きUIタグを認識します。

```html
<py1>
Expand Down
7 changes: 4 additions & 3 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@

**零配置,在浏览器中运行 Python——无需服务器,只需一个 script 标签。**

Pytml 2.5 是一个基于 **Pyodide 314.0.7** 的轻量级 JavaScript 桥接库。你可以直接在 HTML 中编写 Python,操作普通的 DOM 元素,并使用 2.5 运行时支持的简易编号式 UI 语法。
Pytml 2.6 是一个基于 **Pyodide 314.0.7** 的轻量级 JavaScript 桥接库。你可以直接在 HTML 中编写 Python,操作普通的 DOM 元素,并使用 2.6 运行时支持的简易编号式 UI 语法。
在 Pytml 2.6 中,启动时会自动注入 `pytml` 辅助模块,Game Kit(`pytml.game`)已内置并在首次使用时延迟编译。

> **Pyodide 官方相关项目。感谢 Pyodide 团队的支持!**
> **收录于 [Python 周刊第 772 期](https://www.pythonweekly.com/p/python-weekly-issue-772-november-19-2026)!**
Expand All @@ -40,9 +41,9 @@ print(f"Hi {name}!")

`<py>` 标签中的内容会作为 Python 代码运行。`print()` 的输出会显示在页面上,`input()` 则以浏览器输入的方式工作。

## Pytml 2.5 UI 语法
## Pytml 2.6 UI 语法

在 `<pyN>` 块(如 `<py1>`、`<py2>`)内,Pytml 2.5 能识别如下带编号的 UI 标签:
在 `<pyN>` 块(如 `<py1>`、`<py2>`)内,Pytml 2.6 能识别如下带编号的 UI 标签:

```html
<py1>
Expand Down
5 changes: 5 additions & 0 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ <h1>Pytml Demos</h1>
<article class="card"><h2>Greeting</h2><p>Use browser input and Python to build a tiny interactive page.</p><a class="open" href="examples/greeting.html">Open demo →</a></article>
<article class="card"><h2>Joystick</h2><p>Pointer/touch joystick controls exposed to Python.</p><a class="open" href="examples/joystick.html">Open demo →</a></article>
<article class="card"><h2>Packages</h2><p>Install Python packages through micropip and use them in the browser.</p><a class="open" href="examples/packages.html">Open demo →</a></article>
<article class="card"><h2>Game Starter</h2><p>Move a player with keyboard, gamepad or on-screen D-pad using one set of controls.</p><a class="open" href="examples/game-starter.html">Open demo →</a></article>
<article class="card"><h2>Space Shooter</h2><p>A complete tiny game: game loop, sound effects, touch controls, pause and saved high scores.</p><a class="open" href="examples/game-space-shooter.html">Open demo →</a></article>
<article class="card"><h2>Gamepad Tester</h2><p>Live buttons, sticks and rumble for any connected controller.</p><a class="open" href="examples/game-gamepad.html">Open demo →</a></article>
<article class="card"><h2>Sound Lab</h2><p>Built-in retro sound effects and a tone generator. No audio files needed.</p><a class="open" href="examples/game-sound.html">Open demo →</a></article>
<article class="card"><h2>Sprite Animation</h2><p>Sprite sheets, animation and crisp pixel-art rendering on a canvas.</p><a class="open" href="examples/game-sprites.html">Open demo →</a></article>
</div>
</main>
</body>
Expand Down
Loading