Skip to content

Commit e75c01b

Browse files
committed
Final post-release clean-ups
1 parent e0a0071 commit e75c01b

File tree

4 files changed

+29
-9
lines changed

4 files changed

+29
-9
lines changed

docs/beginning-pyscript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ level.
7070

7171
You can see this application embedded into the page below:
7272

73-
<iframe src="https://ntoll.pyscriptapps.com/piratical/v3" style="border: 1px solid black; width:100%;min-height: 400px; border-radius: 0.2rem; box-shadow: var(--md-shadow-z1);"></iframe>
73+
<iframe src="https://ntoll.pyscriptapps.com/piratical/v4/" style="border: 1px solid black; width:100%;min-height: 400px; border-radius: 0.2rem; box-shadow: var(--md-shadow-z1);"></iframe>
7474

7575
Let's explore each of the three files that make this app work.
7676

docs/user-guide/builtins.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,11 @@ use of inline event handlers via custom HTML attributes.
178178
of why this is currently considered bad practice.
179179

180180
These attributes are expressed as `py-*` attributes of an HTML element that
181-
reference the name of a Python function to run when the event is fired. The
182-
`*` is replaced by the name of event, in a similar fashion to how all
181+
reference the name of a Python function to run when the event is fired. You
182+
should replace the `*` with the _actual name of an event_ (e.g. `py-click`).
183+
This is similar to how all
183184
[event handlers on elements](https://html.spec.whatwg.org/multipage/webappapis.html#event-handlers-on-elements,-document-objects,-and-window-objects)
184-
start with `on` (e.g. `onclick`) in standard HTML. The rule of thumb is to
185+
start with `on` in standard HTML (e.g. `onclick`). The rule of thumb is to
185186
simply replace `on` with `py-` and then reference the name of a Python
186187
function.
187188

@@ -210,5 +211,5 @@ enable this behaviour.
210211
manipulation of the attribute's value could have resulted in the evaluation
211212
of arbitrary code.
212213

213-
This is why we changed to the current behaviour of just supplying the name
214-
of the Python function to be evaluated.
214+
This is why we changed to the current behaviour: just supply the name
215+
of the Python function to be evaluated, and PyScript will do this safely.

docs/user-guide/editor.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ The outcome of these code fragments should look something like this:
6161

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

64-
Finally, it is possible to specify a target node into which the output from
65-
`print` statements is directed:
64+
Finally, the `target` attribute allows you to specify a node into which the
65+
editor will be rendered:
6666

6767
```html title="Specify a target for the Python editor."
6868
<script type="mpy-editor" target="editor">

docs/user-guide/examples.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
11
# Example applications
22

3-
** TODO: fill this with references and descriptions to examples on PyScript.com **
3+
A curated list of example applications that demonstrate various features of
4+
PyScript can be found [on PyScript.com](https://pyscript.com/@examples).
5+
6+
The examples are (links take you to the code):
7+
8+
* [Hello world](https://pyscript.com/@examples/hello-world/latest)
9+
* [A simple clock](https://pyscript.com/@examples/simple-clock/latest)
10+
* [Simple slider panel](https://pyscript.com/@examples/simple-panel/latest)
11+
* [Streaming data panel](https://pyscript.com/@examples/streaming-in-panel/latest)
12+
* [WebGL Icosahedron](https://pyscript.com/@examples/webgl-icosahedron/latest)
13+
* [KMeans in a panel](https://pyscript.com/@examples/kmeans-in-panel/latest)
14+
* [New York Taxi panel (WebGL)](https://pyscript.com/@examples/nyc-taxi-panel-deckgl/latest)
15+
* [Pandas dataframe fun](https://pyscript.com/@examples/pandas/latest)
16+
* [Matplotlib example](https://pyscript.com/@examples/matplotlib/latest)
17+
* [Numpy fractals](https://pyscript.com/@examples/fractals-with-numpy-and-canvas/latest)
18+
* [Folium geographical data](https://pyscript.com/@examples/folium/latest)
19+
* [Bokeh data plotting](https://pyscript.com/@examples/bokeh/latest)
20+
* [Import antigravity](https://pyscript.com/@examples/antigravity/latest)
21+
* [Altair data plotting](https://pyscript.com/@examples/altair/latest)
22+

0 commit comments

Comments
 (0)