@@ -13,22 +13,15 @@ can be used to reload the page as you edit the HTML file.
13
13
14
14
## Installation
15
15
16
- First, go to https://pyscript.net and download the PyScript assets.
17
- Unzip the archive to a directory where you wish to write PyScript-enabled
18
- HTML files. You should then have four files in your directory.
16
+ There is no installation required. In this document we'll use
17
+ the PyScript assets served on https://pyscript.net .
19
18
20
- ```
21
- ├── ./
22
- │ ├── pyscript.css
23
- │ ├── pyscript.js
24
- │ └── pyscript.js.map
25
- │ ├── pyscript.min.js
26
- ```
19
+ If you want to download the source and build it yourself follow
20
+ the instructions in the README.md file.
27
21
28
22
## Your first PyScript HTML file
29
23
30
- Here's a "Hello, world!" example using PyScript using the assets you
31
- downloaded from https://pyscript.net .
24
+ Here's a "Hello, world!" example using PyScript
32
25
33
26
Using your favorite editor create a new file called ` hello.html ` in
34
27
the same directory as your PyScript JavaScript and CSS files with the
@@ -38,8 +31,8 @@ open an HTML by double clicking it in your file explorer.
38
31
``` html
39
32
<html >
40
33
<head >
41
- <link rel =" stylesheet" href =" pyscript.css" />
42
- <script defer src =" pyscript.min .js" ></script >
34
+ <link rel =" stylesheet" href =" https://pyscript.net/alpha/ pyscript.css" />
35
+ <script defer src =" https:// pyscript.net/alpha/pyscript .js" ></script >
43
36
</head >
44
37
<body > <py-script > print('Hello, World!') </py-script > </body >
45
38
</html >
@@ -58,8 +51,8 @@ example we can compute π.
58
51
``` html
59
52
<html >
60
53
<head >
61
- <link rel =" stylesheet" href =" pyscript.css" />
62
- <script defer src =" pyscript.min .js" ></script >
54
+ <link rel =" stylesheet" href =" https://pyscript.net/alpha/ pyscript.css" />
55
+ <script defer src =" https:// pyscript.net/alpha/pyscript .js" ></script >
63
56
</head >
64
57
<body >
65
58
<py-script >
@@ -90,8 +83,8 @@ the `<py-script>` tag write to.
90
83
``` html
91
84
<html >
92
85
<head >
93
- <link rel =" stylesheet" href =" pyscript.css" />
94
- <script defer src =" pyscript.min .js" ></script >
86
+ <link rel =" stylesheet" href =" https://pyscript.net/alpha/ pyscript.css" />
87
+ <script defer src =" https:// pyscript.net/alpha/pyscript .js" ></script >
95
88
<link href =" https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel =" stylesheet" crossorigin =" anonymous" >
96
89
</head >
97
90
@@ -130,8 +123,8 @@ as a shortcut, which takes the expression on the last line of the script and run
130
123
``` html
131
124
<html >
132
125
<head >
133
- <link rel =" stylesheet" href =" pyscript.css" />
134
- <script defer src =" pyscript.min .js" ></script >
126
+ <link rel =" stylesheet" href =" https://pyscript.net/alpha/ pyscript.css" />
127
+ <script defer src =" https:// pyscript.net/alpha/pyscript .js" ></script >
135
128
<py-env >
136
129
- numpy
137
130
- matplotlib
@@ -178,8 +171,8 @@ In the HTML tag `<py-env>` paths to local modules are provided in the
178
171
``` html
179
172
<html >
180
173
<head >
181
- <link rel =" stylesheet" href =" pyscript.css" />
182
- <script defer src =" pyscript.min .js" ></script >
174
+ <link rel =" stylesheet" href =" https://pyscript.net/alpha/ pyscript.css" />
175
+ <script defer src =" https:// pyscript.net/alpha/pyscript .js" ></script >
183
176
<py-env >
184
177
- numpy
185
178
- matplotlib
0 commit comments