-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPyScript_General-pyscript-docs_1037014340802453615.html
More file actions
414 lines (375 loc) · 323 KB
/
PyScript_General-pyscript-docs_1037014340802453615.html
File metadata and controls
414 lines (375 loc) · 323 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
<!DOCTYPE html>
<html lang="en"><head><title>PyScript 💻 - ╰╸pyscript-docs</title><meta charset="utf-8"/><meta content="width=device-width" name="viewport"/><style>@font-face{src:url("https://cdn.jsdelivr.net/gh/Tyrrrz/DiscordFonts@master/ggsans-normal-400.woff2");font-family:gg sans;font-weight:400;font-style:normal}@font-face{src:url("https://cdn.jsdelivr.net/gh/Tyrrrz/DiscordFonts@master/ggsans-normal-500.woff2");font-family:gg sans;font-weight:500;font-style:normal}@font-face{src:url("https://cdn.jsdelivr.net/gh/Tyrrrz/DiscordFonts@master/ggsans-normal-600.woff2");font-family:gg sans;font-weight:600;font-style:normal}@font-face{src:url("https://cdn.jsdelivr.net/gh/Tyrrrz/DiscordFonts@master/ggsans-normal-700.woff2");font-family:gg sans;font-weight:700;font-style:normal}@font-face{src:url("https://cdn.jsdelivr.net/gh/Tyrrrz/DiscordFonts@master/ggsans-normal-800.woff2");font-family:gg sans;font-weight:800;font-style:normal}@font-face{src:url("https://cdn.jsdelivr.net/gh/Tyrrrz/DiscordFonts@master/ggsans-italic-400.woff2");font-family:gg sans;font-weight:400;font-style:italic}@font-face{src:url("https://cdn.jsdelivr.net/gh/Tyrrrz/DiscordFonts@master/ggsans-italic-500.woff2");font-family:gg sans;font-weight:500;font-style:italic}@font-face{src:url("https://cdn.jsdelivr.net/gh/Tyrrrz/DiscordFonts@master/ggsans-italic-600.woff2");font-family:gg sans;font-weight:600;font-style:italic}@font-face{src:url("https://cdn.jsdelivr.net/gh/Tyrrrz/DiscordFonts@master/ggsans-italic-700.woff2");font-family:gg sans;font-weight:700;font-style:italic}@font-face{src:url("https://cdn.jsdelivr.net/gh/Tyrrrz/DiscordFonts@master/ggsans-italic-800.woff2");font-family:gg sans;font-weight:800;font-style:italic}html,body{margin:0;padding:0;background-color:#ffffff;color:#23262a;font-family:"gg sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:17px;font-weight:500;scroll-behavior:smooth}a{color:#0068e0;text-decoration:none}a:hover{text-decoration:underline}img{object-fit:contain;image-rendering:high-quality;image-rendering:-webkit-optimize-contrast}.preamble{display:grid;grid-template-columns:auto 1fr;max-width:100%;padding:1rem}.preamble__guild-icon-container{grid-column:1}.preamble__guild-icon{max-width:88px;max-height:88px}.preamble__entries-container{grid-column:2;margin-left:1rem}.preamble__entry{margin-bottom:0.15rem;color:#2f3136;font-size:1.4rem}.preamble__entry--small{font-size:1rem}.chatlog{padding:1rem 0;width:100%;border-top:1px solid #eceeef;border-bottom:1px solid #eceeef}.chatlog__message-group{margin-bottom:1rem}.chatlog__message-container{background-color:transparent;transition:background-color 1s ease}.chatlog__message-container--highlighted{background-color:rgba(114,137,218,0.2)}.chatlog__message-container--pinned{background-color:rgba(249,168,37,0.05)}.chatlog__message{display:grid;grid-template-columns:auto 1fr;padding:0.15rem 0;direction:ltr;unicode-bidi:bidi-override}.chatlog__message:hover{background-color:#fafafa}.chatlog__message:hover .chatlog__short-timestamp{display:block}.chatlog__message-aside{grid-column:1;width:72px;padding:0.15rem 0.15rem 0 0.15rem;text-align:center}.chatlog__reply-symbol{height:10px;margin:6px 4px 4px 36px;border-left:2px solid #c7ccd1;border-top:2px solid #c7ccd1;border-radius:8px 0 0 0}.chatlog__avatar{width:40px;height:40px;border-radius:50%}.chatlog__short-timestamp{display:none;color:#5e6772;font-size:0.75rem;font-weight:500;direction:ltr;unicode-bidi:bidi-override}.chatlog__message-primary{grid-column:2;min-width:0}.chatlog__reply{display:flex;margin-bottom:0.15rem;align-items:center;color:#5f5f60;font-size:0.875rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chatlog__reply-avatar{width:16px;height:16px;margin-right:0.25rem;border-radius:50%}.chatlog__reply-author{margin-right:0.3rem;font-weight:600}.chatlog__reply-content{overflow:hidden;text-overflow:ellipsis}.chatlog__reply-link{cursor:pointer}.chatlog__reply-link *{display:inline;pointer-events:none}.chatlog__reply-link .chatlog__markdown-quote{display:inline}.chatlog__reply-link .chatlog__markdown-pre{display:inline}.chatlog__reply-link:hover{color:#2f3136}.chatlog__reply-link:hover *:not(.chatlog__markdown-spoiler){color:inherit}.chatlog__reply-edited-timestamp{margin-left:0.25rem;color:#5e6772;font-size:0.75rem;font-weight:500;direction:ltr;unicode-bidi:bidi-override}.chatlog__system-notification-icon{width:18px;height:18px}.chatlog__system-notification-author{font-weight:600;color:#2f3136}.chatlog__system-notification-content{color:#5e6772}.chatlog__system-notification-link{font-weight:500;color:#2f3136}.chatlog__system-notification-timestamp{margin-left:0.3rem;color:#5e6772;font-size:0.75rem;font-weight:500;direction:ltr;unicode-bidi:bidi-override}.chatlog__system-notification-timestamp a{color:inherit}.chatlog__header{margin-bottom:0.1rem}.chatlog__author{font-weight:600;color:#2f3136}.chatlog__author-tag{position:relative;top:-0.1rem;margin-left:0.3rem;padding:0.05rem 0.3rem;border-radius:3px;background-color:#5865F2;color:#ffffff;font-size:0.625rem;font-weight:500;line-height:1.3}.chatlog__timestamp{margin-left:0.3rem;color:#5e6772;font-size:0.75rem;font-weight:500;direction:ltr;unicode-bidi:bidi-override}.chatlog__timestamp a{color:inherit}.chatlog__content{padding-right:1rem;font-size:0.95rem;word-wrap:break-word}.chatlog__edited-timestamp{margin-left:0.15rem;color:#5e6772;font-size:0.75rem;font-weight:500}.chatlog__attachment{position:relative;width:fit-content;margin-top:0.3rem;border-radius:3px;overflow:hidden}.chatlog__attachment--hidden{cursor:pointer;box-shadow:0 0 1px 1px rgba(0,0,0,0.1)}.chatlog__attachment--hidden *{pointer-events:none}.chatlog__attachment-spoiler-caption{display:none;position:absolute;left:50%;top:50%;z-index:999;padding:0.4rem 0.8rem;border-radius:20px;transform:translate(-50%,-50%);background-color:rgba(0,0,0,0.9);color:#dcddde;font-size:0.9rem;font-weight:600;letter-spacing:0.05rem}.chatlog__attachment--hidden .chatlog__attachment-spoiler-caption{display:block}.chatlog__attachment--hidden:hover .chatlog__attachment-spoiler-caption{color:#fff}.chatlog__attachment-media{max-width:45vw;max-height:500px;vertical-align:top;border-radius:3px}.chatlog__attachment--hidden .chatlog__attachment-media{filter:blur(44px)}.chatlog__attachment-generic{max-width:520px;width:100%;height:40px;padding:10px;border:1px solid #ebedef;border-radius:3px;background-color:#f2f3f5;overflow:hidden}.chatlog__attachment--hidden .chatlog__attachment-generic{filter:blur(44px)}.chatlog__attachment-generic-icon{float:left;width:30px;height:100%;margin-right:10px}.chatlog__attachment-generic-size{color:#72767d;font-size:12px}.chatlog__attachment-generic-name{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.chatlog__embed{display:flex;margin-top:0.3rem;max-width:520px}.chatlog__embed-color-pill{flex-shrink:0;width:0.25rem;border-top-left-radius:3px;border-bottom-left-radius:3px}.chatlog__embed-color-pill--default{background-color:rgba(227,229,232,1)}.chatlog__embed-content-container{display:flex;flex-direction:column;padding:0.5rem 0.6rem;border:1px solid rgba(204,204,204,0.3);border-top-right-radius:3px;border-bottom-right-radius:3px;background-color:rgba(249,249,249,0.3)}.chatlog__embed-content{display:flex;width:100%}.chatlog__embed-text{flex:1}.chatlog__embed-author-container{display:flex;margin-bottom:0.5rem;align-items:center}.chatlog__embed-author-icon{width:20px;height:20px;margin-right:0.5rem;border-radius:50%}.chatlog__embed-author{color:#4f545c;font-size:0.875rem;font-weight:600;direction:ltr;unicode-bidi:bidi-override}.chatlog__embed-author-link{color:#4f545c}.chatlog__embed-title{margin-bottom:0.5rem;color:#4f545c;font-size:0.875rem;font-weight:600}.chatlog__embed-description{color:#2e3338;font-weight:500;font-size:0.85rem}.chatlog__embed-fields{display:flex;flex-wrap:wrap;gap:0 0.5rem}.chatlog__embed-field{flex:0;min-width:100%;max-width:506px;padding-top:0.6rem;font-size:0.875rem}.chatlog__embed-field--inline{flex:1;flex-basis:auto;min-width:50px}.chatlog__embed-field-name{margin-bottom:0.2rem;color:#36393e;font-weight:600}.chatlog__embed-field-value{color:#2e3338;font-weight:500}.chatlog__embed-thumbnail{flex:0;max-width:80px;max-height:80px;margin-left:1.2rem;border-radius:3px}.chatlog__embed-images{display:grid;margin-top:0.6rem;grid-template-columns:repeat(2,1fr);gap:0.25rem}.chatlog__embed-images--single{display:block}.chatlog__embed-image{object-fit:cover;object-position:center;max-width:500px;max-height:400px;width:100%;height:100%;border-radius:3px}.chatlog__embed-footer{margin-top:0.6rem;color:#2e3338}.chatlog__embed-footer-icon{width:20px;height:20px;margin-right:0.2rem;border-radius:50%;vertical-align:middle}.chatlog__embed-footer-text{vertical-align:middle;font-size:0.75rem;font-weight:500}.chatlog__embed-invite-container{min-width:320px;padding:0.6rem 0.7rem;border:1px solid rgba(204,204,204,0.3);border-radius:3px;background-color:rgba(249,249,249,0.3)}.chatlog__embed-invite-title{margin:0 0 0.8rem 0;color:#4f5660;font-size:0.75rem;font-weight:700;text-transform:uppercase}.chatlog__embed-invite{display:flex}.chatlog__embed-invite-guild-icon{width:50px;height:50px;border-radius:0.85rem}.chatlog__embed-invite-info{margin-left:1rem}.chatlog__embed-invite-guild-name{color:#36393e;font-weight:600}.chatlog__embed-invite-guild-name a{color:inherit}.chatlog__embed-invite-channel-icon{width:18px;height:18px;vertical-align:bottom}.chatlog__embed-invite-channel-name{font-size:0.9rem;font-weight:600}.chatlog__embed-generic-image{object-fit:contain;object-position:left;max-width:45vw;max-height:500px;vertical-align:top;border-radius:3px}.chatlog__embed-generic-video{object-fit:contain;object-position:left;max-width:45vw;max-height:500px;vertical-align:top;border-radius:3px}.chatlog__embed-generic-gifv{object-fit:contain;object-position:left;max-width:45vw;max-height:500px;vertical-align:top;border-radius:3px}.chatlog__embed-spotify{border:0}.chatlog__embed-twitch{border:0}.chatlog__embed-youtube-container{margin-top:0.6rem}.chatlog__embed-youtube{border:0;border-radius:3px}.chatlog__sticker{width:180px;height:180px}.chatlog__sticker--media{max-width:100%;max-height:100%}.chatlog__reactions{display:flex}.chatlog__reaction{display:flex;margin:0.35rem 0.1rem 0.1rem 0;padding:0.125rem 0.375rem;border:1px solid transparent;border-radius:8px;background-color:#f2f3f5;align-items:center}.chatlog__reaction:hover{border:1px solid rgba(0,0,0,0.2);background-color:white}.chatlog__reaction-count{min-width:9px;margin-left:0.35rem;color:#4f5660;font-size:0.875rem}.chatlog__reaction:hover .chatlog__reaction-count{color:#2e3338}.chatlog__markdown{max-width:100%;line-height:1.3;overflow-wrap:break-word}.chatlog__markdown h1{margin:1rem 0 0.5rem;color:#060607;font-size:1.5rem;line-height:1}.chatlog__markdown h2{margin:1rem 0 0.5rem;color:#060607;font-size:1.25rem;line-height:1}.chatlog__markdown h3{margin:1rem 0 0.5rem;color:#060607;font-size:1rem;line-height:1}.chatlog__markdown h1:first-child,h2:first-child,h3:first-child{margin-top:0.5rem}.chatlog__markdown ul,ol{margin:0 0 0 1rem;padding:0}.chatlog__markdown-preserve{white-space:pre-wrap}.chatlog__markdown-spoiler{background-color:rgba(0,0,0,0.1);padding:0 2px;border-radius:3px}.chatlog__markdown-spoiler--hidden{cursor:pointer;background-color:#b9bbbe;color:rgba(0,0,0,0)}.chatlog__markdown-spoiler--hidden:hover{background-color:rgba(185,187,190,0.8)}.chatlog__markdown-spoiler--hidden::selection{color:rgba(0,0,0,0)}.chatlog__markdown-quote{display:flex;margin:0.05rem 0}.chatlog__markdown-quote-border{margin-right:0.5rem;border:2px solid #c7ccd1;border-radius:3px}.chatlog__markdown-pre{background-color:#f9f9f9;font-family:"Consolas","Courier New",Courier,monospace;font-size:0.85rem;text-decoration:inherit}.chatlog__markdown-pre--multiline{display:block;margin-top:0.25rem;padding:0.5rem;border:2px solid #f3f3f3;border-radius:5px;color:#657b83}.chatlog__markdown-pre--multiline.hljs{background-color:#f9f9f9;color:#657b83}.chatlog__markdown-pre--inline{display:inline-block;padding:2px;border-radius:3px}.chatlog__markdown-mention{border-radius:3px;padding:0 2px;background-color:rgba(88,101,242,.15);color:#505cdc;font-weight:500}.chatlog__markdown-mention:hover{background-color:#5865f2;color:#ffffff}.chatlog__markdown-timestamp{background-color:rgba(0,0,0,0.1);padding:0 2px;border-radius:3px}.chatlog__emoji{width:1.325rem;height:1.325rem;margin:0 0.06rem;vertical-align:-0.4rem}.chatlog__emoji--small{width:1rem;height:1rem}.chatlog__emoji--large{width:2.8rem;height:2.8rem}.postamble{padding:1.25rem}.postamble__entry{color:#2f3136}</style><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/solarized-light.min.css" rel="stylesheet"/><script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/highlight.min.js"></script><script>document.addEventListener('DOMContentLoaded',()=>{document.querySelectorAll('.chatlog__markdown-pre--multiline').forEach(e=>hljs.highlightBlock(e));});</script><script src="https://cdnjs.cloudflare.com/ajax/libs/lottie-web/5.8.1/lottie.min.js"></script><script>document.addEventListener('DOMContentLoaded',()=>{document.querySelectorAll('.chatlog__sticker--media[data-source]').forEach(e=>{const anim=lottie.loadAnimation({container:e,renderer:'svg',loop:true,autoplay:true,path:e.getAttribute('data-source')});anim.addEventListener('data_failed',()=>e.innerHTML='<strong>[Sticker cannot be rendered]</strong>');});});</script><script>function scrollToMessage(event,id){const element=document.getElementById('chatlog__message-container-'+id);if(!element)
return;event.preventDefault();element.classList.add('chatlog__message-container--highlighted');window.scrollTo({top:element.getBoundingClientRect().top-document.body.getBoundingClientRect().top-(window.innerHeight/2),behavior:'smooth'});window.setTimeout(()=>element.classList.remove('chatlog__message-container--highlighted'),2000);}
function showSpoiler(event,element){if(!element)
return;if(element.classList.contains('chatlog__attachment--hidden')){event.preventDefault();element.classList.remove('chatlog__attachment--hidden');}
if(element.classList.contains('chatlog__markdown-spoiler--hidden')){event.preventDefault();element.classList.remove('chatlog__markdown-spoiler--hidden');}}</script><svg style="display:none" xmlns="http://www.w3.org/2000/svg"><defs><symbol id="attachment-icon" viewbox="0 0 720 960"><path d="M50,935a25,25,0,0,1-25-25V50A25,25,0,0,1,50,25H519.6L695,201.32V910a25,25,0,0,1-25,25Z" fill="#f4f5fb"></path><path d="M509.21,50,670,211.63V910H50V50H509.21M530,0H50A50,50,0,0,0,0,50V910a50,50,0,0,0,50,50H670a50,50,0,0,0,50-50h0V191Z" fill="#7789c4"></path><path d="M530,215a25,25,0,0,1-25-25V50a25,25,0,0,1,16.23-23.41L693.41,198.77A25,25,0,0,1,670,215Z" fill="#f4f5fb"></path><path d="M530,70.71,649.29,190H530V70.71M530,0a50,50,0,0,0-50,50V190a50,50,0,0,0,50,50H670a50,50,0,0,0,50-50Z" fill="#7789c4"></path></symbol><symbol id="join-icon" viewbox="0 0 18 18"><path d="m0 8h14.2l-3.6-3.6 1.4-1.4 6 6-6 6-1.4-1.4 3.6-3.6h-14.2" fill="#3ba55c"></path></symbol><symbol id="leave-icon" viewbox="0 0 18 18"><path d="m3.8 8 3.6-3.6-1.4-1.4-6 6 6 6 1.4-1.4-3.6-3.6h14.2v-2" fill="#ed4245"></path></symbol><symbol id="call-icon" viewbox="0 0 18 18"><path d="M17.7163041 15.36645368c-.0190957.02699568-1.9039523 2.6680735-2.9957762 2.63320406-3.0676659-.09785935-6.6733809-3.07188394-9.15694343-5.548738C3.08002193 9.9740657.09772497 6.3791404 0 3.3061316v-.024746C0 2.2060575 2.61386252.3152347 2.64082114.2972376c.7110335-.4971705 1.4917101-.3149497 1.80959713.1372281.19320342.2744561 2.19712724 3.2811005 2.42290565 3.6489167.09884826.1608492.14714912.3554431.14714912.5702838 0 .2744561-.07975258.5770327-.23701117.8751101-.1527655.2902036-.65262318 1.1664385-.89862055 1.594995.2673396.3768148.94804468 1.26429792 2.351016 2.66357424 1.39173858 1.39027775 2.28923588 2.07641807 2.67002628 2.34187563.4302146-.2452108 1.3086162-.74238132 1.5972981-.89423205.5447887-.28682915 1.0907006-.31944893 1.4568885-.08661115.3459689.2182151 3.3383754 2.21027167 3.6225641 2.41611376.2695862.19234426.4144887.5399137.4144887.91672846 0 .2969525-.089862.61190215-.2808189.88523346" fill="#3ba55c" fill-rule="evenodd"></path></symbol><symbol id="pencil-icon" viewbox="0 0 18 18"><path d="m0 14.25v3.75h3.75l11.06-11.06-3.75-3.75zm17.71-10.21c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75z" fill="#99aab5"></path></symbol><symbol id="pin-icon" viewbox="0 0 18 18"><path d="m16.908 8.39684-8.29587-8.295827-1.18584 1.184157 1.18584 1.18584-4.14834 4.1475v.00167l-1.18583-1.18583-1.185 1.18583 3.55583 3.55502-4.740831 4.74 1.185001 1.185 4.74083-4.74 3.55581 3.555 1.185-1.185-1.185-1.185 4.1475-4.14836h.0009l1.185 1.185z" fill="#b9bbbe"></path></symbol><symbol id="channel-icon" viewbox="0 0 24 24"><path d="M5.88657 21C5.57547 21 5.3399 20.7189 5.39427 20.4126L6.00001 17H2.59511C2.28449 17 2.04905 16.7198 2.10259 16.4138L2.27759 15.4138C2.31946 15.1746 2.52722 15 2.77011 15H6.35001L7.41001 9H4.00511C3.69449 9 3.45905 8.71977 3.51259 8.41381L3.68759 7.41381C3.72946 7.17456 3.93722 7 4.18011 7H7.76001L8.39677 3.41262C8.43914 3.17391 8.64664 3 8.88907 3H9.87344C10.1845 3 10.4201 3.28107 10.3657 3.58738L9.76001 7H15.76L16.3968 3.41262C16.4391 3.17391 16.6466 3 16.8891 3H17.8734C18.1845 3 18.4201 3.28107 18.3657 3.58738L17.76 7H21.1649C21.4755 7 21.711 7.28023 21.6574 7.58619L21.4824 8.58619C21.4406 8.82544 21.2328 9 20.9899 9H17.41L16.35 15H19.7549C20.0655 15 20.301 15.2802 20.2474 15.5862L20.0724 16.5862C20.0306 16.8254 19.8228 17 19.5799 17H16L15.3632 20.5874C15.3209 20.8261 15.1134 21 14.8709 21H13.8866C13.5755 21 13.3399 20.7189 13.3943 20.4126L14 17H8.00001L7.36325 20.5874C7.32088 20.8261 7.11337 21 6.87094 21H5.88657ZM9.41045 9L8.35045 15H14.3504L15.4104 9H9.41045Z" fill="#b9bbbe"></path></symbol><symbol id="thread-icon" viewbox="0 0 24 24"><path d="M5.43309 21C5.35842 21 5.30189 20.9325 5.31494 20.859L5.99991 17H2.14274C2.06819 17 2.01168 16.9327 2.02453 16.8593L2.33253 15.0993C2.34258 15.0419 2.39244 15 2.45074 15H6.34991L7.40991 9H3.55274C3.47819 9 3.42168 8.93274 3.43453 8.85931L3.74253 7.09931C3.75258 7.04189 3.80244 7 3.86074 7H7.75991L8.45234 3.09903C8.46251 3.04174 8.51231 3 8.57049 3H10.3267C10.4014 3 10.4579 3.06746 10.4449 3.14097L9.75991 7H15.7599L16.4523 3.09903C16.4625 3.04174 16.5123 3 16.5705 3H18.3267C18.4014 3 18.4579 3.06746 18.4449 3.14097L17.7599 7H21.6171C21.6916 7 21.7481 7.06725 21.7353 7.14069L21.4273 8.90069C21.4172 8.95811 21.3674 9 21.3091 9H17.4099L17.0495 11.04H15.05L15.4104 9H9.41035L8.35035 15H10.5599V17H7.99991L7.30749 20.901C7.29732 20.9583 7.24752 21 7.18934 21H5.43309Z" fill="#b9bbbe"></path><path d="M13.4399 12.96C12.9097 12.96 12.4799 13.3898 12.4799 13.92V20.2213C12.4799 20.7515 12.9097 21.1813 13.4399 21.1813H14.3999C14.5325 21.1813 14.6399 21.2887 14.6399 21.4213V23.4597C14.6399 23.6677 14.8865 23.7773 15.0408 23.6378L17.4858 21.4289C17.6622 21.2695 17.8916 21.1813 18.1294 21.1813H22.5599C23.0901 21.1813 23.5199 20.7515 23.5199 20.2213V13.92C23.5199 13.3898 23.0901 12.96 22.5599 12.96H13.4399Z" fill="#b9bbbe"></path></symbol></defs></svg><body><div class="preamble"><div class="preamble__guild-icon-container"><img alt="Guild icon" class="preamble__guild-icon" loading="lazy" src="assets/eef8bb9f6c6a6b82d7a65bb77f8b5e94.png"/></div><div class="preamble__entries-container"><div class="preamble__entry">PyScript 💻</div><div class="preamble__entry">💬 | General / ╰╸pyscript-docs</div><div class="preamble__entry preamble__entry--small">For feedback, questions and suggestions relating to our docs found at <a href="https://docs.pyscript.net/">https://docs.pyscript.net/</a></div></div></div>
<div class="chatlog">
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1037020846331547698" id="chatlog__message-container-1037020846331547698"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/f4bf1df4f395cb0b3559f2d882ac7bed.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1020363855630700555" style="color:rgb(233,102,11)" title="tedpatrick">tedpatrick</span> <span class="chatlog__timestamp" title="01 November 2022 15:10"><a href="#chatlog__message-container-1037020846331547698">01/11/2022 15:10</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Hello Docs!</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="wave_tone2"><img alt="👋🏼" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44b-1f3fc.svg"/> <span class="chatlog__reaction-count">9</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1158070954996535387" id="chatlog__message-container-1158070954996535387"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/2.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1154996167176896602" title="arvind_94116">arvind</span> <span class="chatlog__timestamp" title="01 October 2023 17:00"><a href="#chatlog__message-container-1158070954996535387">01/10/2023 17:00</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Hi. I am new to pyscript - was reading the old pyscript docs . It seems that it has been taken off. The new pyscript docs contain very minimal information. I am wondering how to access the old documentaion. Is it deprecated ? or is the functionality explained in old docs deprecated ?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1158099454109417482" id="chatlog__message-container-1158099454109417482"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="01 October 2023 18:53"><a href="#chatlog__message-container-1158099454109417482">01/10/2023 18:53</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Hi <span class="chatlog__markdown-mention" title="arvind_94116">@arvind</span> - the version of the docs that you see right now is for the next version of PyScript, which is a complete re-write with much of the old docs out of date or just plain wrong. The new docs will mature as the release candiates for the next version are released. They'll be comprehensive and accurate by the time we do a final release of the next version. As for the old docs... archive.org has you covered: <a href="https://web.archive.org/web/20230521045221/https://docs.pyscript.net/latest/">https://web.archive.org/web/20230521045221/https://docs.pyscript.net/latest/</a></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1158103887132250123" id="chatlog__message-container-1158103887132250123"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="688046964549353491" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</span> <span class="chatlog__timestamp" title="01 October 2023 19:11"><a href="#chatlog__message-container-1158103887132250123">01/10/2023 19:11</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Another option (esp for those who's workplace/geography has archive.org blocked) is to view them on GitHub under the tag of the previous release: <a href="https://github.com/pyscript/pyscript/tree/2023.05.1/docs">https://github.com/pyscript/pyscript/tree/2023.05.1/docs</a></span></div><div class="chatlog__embed"><div class="chatlog__embed-color-pill" style="background-color:rgba(30,35,39,255)"></div><div class="chatlog__embed-content-container"><div class="chatlog__embed-content"><div class="chatlog__embed-text"><div class="chatlog__embed-title"><a class="chatlog__embed-title-link" href="https://github.com/pyscript/pyscript/tree/2023.05.1/docs"><div class="chatlog__markdown chatlog__markdown-preserve">pyscript/docs at 2023.05.1 · pyscript/pyscript</div></a></div><div class="chatlog__embed-description"><div class="chatlog__markdown chatlog__markdown-preserve">Home Page: <a href="https://pyscript.net">https://pyscript.net</a> Examples: <a href="https://pyscript.net/examples">https://pyscript.net/examples</a> - pyscript/pyscript</div></div></div><div class="chatlog__embed-thumbnail-container"><a class="chatlog__embed-thumbnail-link" href="https://images-ext-1.discordapp.net/external/R-aT9oyRMqEWBnyQpCbiHCQZDbHhFkB-hOa9aEoULxk/https/opengraph.githubassets.com/49e399d6a1d625ef03abbc0cb0d0b0da0a77dbe87a16f376d79cec45cdf9a98a/pyscript/pyscript"> <img alt="Thumbnail" class="chatlog__embed-thumbnail" loading="lazy" src="https://images-ext-1.discordapp.net/external/R-aT9oyRMqEWBnyQpCbiHCQZDbHhFkB-hOa9aEoULxk/https/opengraph.githubassets.com/49e399d6a1d625ef03abbc0cb0d0b0da0a77dbe87a16f376d79cec45cdf9a98a/pyscript/pyscript"/> </a></div></div></div></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1158110097348771850" id="chatlog__message-container-1158110097348771850"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="01 October 2023 19:36"><a href="#chatlog__message-container-1158110097348771850">01/10/2023 19:36</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Thank you <span class="chatlog__markdown-mention" title="jeffglass">@Jeff Glass</span> <img alt="🚀" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f680.svg" title="rocket"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1158355109504356362" id="chatlog__message-container-1158355109504356362"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/3c0dfca32c7e7adba00db61113e9986d.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="689486962003804216" style="color:rgb(26,194,181)" title="antocuni">antocuni</span> <span class="chatlog__timestamp" title="02 October 2023 11:49"><a href="#chatlog__message-container-1158355109504356362">02/10/2023 11:49</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">really, we should continue hosting the old docs somewhere.
Python still hosts documentation for 3.5 (released in 2015), Django for 1.8 (also released in 2015), numpy for 1.3 (released in 2009).
Why can't we host docs for something which we released a few months ago?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1158398061391904839" id="chatlog__message-container-1158398061391904839"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/f4bf1df4f395cb0b3559f2d882ac7bed.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/3c0dfca32c7e7adba00db61113e9986d.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="antocuni">antocuni</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1158355109504356362')"> really, we should continue hosting the old docs somewhere.
Python still hosts documentation for 3.5 (released in 2015), Django for 1.8 (also released in 2015), numpy for 1.3 (released in 2009).
Why can't we host docs for something which we released a few months ago? </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1020363855630700555" style="color:rgb(233,102,11)" title="tedpatrick">tedpatrick</span> <span class="chatlog__timestamp" title="02 October 2023 14:40"><a href="#chatlog__message-container-1158398061391904839">02/10/2023 14:40</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">My take: Key reason is burying the old in favor of the new. SEO plays a key role in adoption, and if we remove the old, the new will become the default in SEO and search. Next is a huge reset... and we should reset the docs.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1158399987886075976" id="chatlog__message-container-1158399987886075976"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="688046964549353491" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</span> <span class="chatlog__timestamp" title="02 October 2023 14:47"><a href="#chatlog__message-container-1158399987886075976">02/10/2023 14:47</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Not a bad reason, I don't know that much about SEO. But I'm with Antonio: - anyone who is still using PyScript Classic (which is our current release) is now out of luck. And anyone who linked to our older docs now has a bunch of broken links on their hands with no obvious fix.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1158400222301536397" id="chatlog__message-container-1158400222301536397"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/3c0dfca32c7e7adba00db61113e9986d.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="689486962003804216" style="color:rgb(26,194,181)" title="antocuni">antocuni</span> <span class="chatlog__timestamp" title="02 October 2023 14:48"><a href="#chatlog__message-container-1158400222301536397">02/10/2023 14:48</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I mean, the original sin is that the URLs of our docs were not versioned</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1158400470373650442" id="chatlog__message-container-1158400470373650442"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/3c0dfca32c7e7adba00db61113e9986d.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="antocuni">antocuni</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1158400222301536397')"> I mean, the original sin is that the URLs of our docs were not versioned </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="688046964549353491" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</span> <span class="chatlog__timestamp" title="02 October 2023 14:49"><a href="#chatlog__message-container-1158400470373650442">02/10/2023 14:49</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">They were versioned: <a href="https://web.archive.org/web/20221222013505/https://docs.pyscript.net/2022.12.1/">https://web.archive.org/web/20221222013505/https://docs.pyscript.net/2022.12.1/</a></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1158400501138866216" id="chatlog__message-container-1158400501138866216"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/3c0dfca32c7e7adba00db61113e9986d.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="689486962003804216" style="color:rgb(26,194,181)" title="antocuni">antocuni</span> <span class="chatlog__timestamp" title="02 October 2023 14:50"><a href="#chatlog__message-container-1158400501138866216">02/10/2023 14:50</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">ah ok</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1158400688771059762" id="chatlog__message-container-1158400688771059762"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="02 October 2023 14:50">14:50</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">then IMHO the correct solution is to resurrect them and put a banner on top which says "this is the old version, click here for the new one"</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1159171641071386737" id="chatlog__message-container-1159171641071386737"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/2.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1154996167176896602" title="arvind_94116">arvind</span> <span class="chatlog__timestamp" title="04 October 2023 17:54"><a href="#chatlog__message-container-1159171641071386737">04/10/2023 17:54</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Hi <span class="chatlog__markdown-mention" title="ntoll">@ntoll</span> -thanks a lot. however, the archived site is painfully slow</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1159411240288923669" id="chatlog__message-container-1159411240288923669"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="05 October 2023 09:46"><a href="#chatlog__message-container-1159411240288923669">05/10/2023 09:46</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="arvind_94116">@arvind</span> the GitHub link from <span class="chatlog__markdown-mention" title="jeffglass">@Jeff Glass</span> will be much faster: <a href="https://github.com/pyscript/pyscript/tree/2023.05.1/docs">https://github.com/pyscript/pyscript/tree/2023.05.1/docs</a> (we don't have any control over the performance of archive.org)</span></div><div class="chatlog__embed"><div class="chatlog__embed-color-pill" style="background-color:rgba(30,35,39,255)"></div><div class="chatlog__embed-content-container"><div class="chatlog__embed-content"><div class="chatlog__embed-text"><div class="chatlog__embed-title"><a class="chatlog__embed-title-link" href="https://github.com/pyscript/pyscript/tree/2023.05.1/docs"><div class="chatlog__markdown chatlog__markdown-preserve">pyscript/docs at 2023.05.1 · pyscript/pyscript</div></a></div><div class="chatlog__embed-description"><div class="chatlog__markdown chatlog__markdown-preserve">Home Page: <a href="https://pyscript.net">https://pyscript.net</a> Examples: <a href="https://pyscript.net/examples">https://pyscript.net/examples</a> - pyscript/pyscript</div></div></div><div class="chatlog__embed-thumbnail-container"><a class="chatlog__embed-thumbnail-link" href="https://images-ext-1.discordapp.net/external/86D6K8uZ3oQoTeF7vYSqViy-cPCFng_trF_g3UqFgwk/https/opengraph.githubassets.com/36d08c48c5654150181d8924fed2686bce09e52e2ebb3154e08d462c671ee8dd/pyscript/pyscript"> <img alt="Thumbnail" class="chatlog__embed-thumbnail" loading="lazy" src="https://images-ext-1.discordapp.net/external/86D6K8uZ3oQoTeF7vYSqViy-cPCFng_trF_g3UqFgwk/https/opengraph.githubassets.com/36d08c48c5654150181d8924fed2686bce09e52e2ebb3154e08d462c671ee8dd/pyscript/pyscript"/> </a></div></div></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1159446647605055498" id="chatlog__message-container-1159446647605055498"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/2.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1154996167176896602" title="arvind_94116">arvind</span> <span class="chatlog__timestamp" title="05 October 2023 12:07"><a href="#chatlog__message-container-1159446647605055498">05/10/2023 12:07</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">hi <span class="chatlog__markdown-mention" title="ntoll">@ntoll</span> - thanks a lot. I understand that the new version in progress now will provide better functionality , but what are the things from the old version, which won't work at all - a small list of that would be helpful. Thanks again.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1159452706189099058" id="chatlog__message-container-1159452706189099058"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="05 October 2023 12:31"><a href="#chatlog__message-container-1159452706189099058">05/10/2023 12:31</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="arvind_94116">@arvind</span> that's a really great question. I think we should write a blog post enumerating these things for folks.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1159477136973905960" id="chatlog__message-container-1159477136973905960"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/3c0dfca32c7e7adba00db61113e9986d.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/><div class="chatlog__reply-author" style="color:rgb(233,102,11)" title="ntoll">ntoll</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1159452706189099058')"> <span class="chatlog__markdown-mention" title="arvind_94116">@arvind</span> that's a really great question. I think we should write a blog post enumerating these things for folks. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="689486962003804216" style="color:rgb(26,194,181)" title="antocuni">antocuni</span> <span class="chatlog__timestamp" title="05 October 2023 14:08"><a href="#chatlog__message-container-1159477136973905960">05/10/2023 14:08</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I think it should be a section of the docs (maybe in the changelog), not just a blog post</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1159477591116361820" id="chatlog__message-container-1159477591116361820"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="05 October 2023 14:09"><a href="#chatlog__message-container-1159477591116361820">05/10/2023 14:09</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Perhaps a "migrating from classic" section.</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="heart"><img alt="❤️" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/2764.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1159477935326109736" id="chatlog__message-container-1159477935326109736"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/3c0dfca32c7e7adba00db61113e9986d.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/><div class="chatlog__reply-author" style="color:rgb(233,102,11)" title="ntoll">ntoll</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1159477591116361820')"> Perhaps a "migrating from classic" section. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="689486962003804216" style="color:rgb(26,194,181)" title="antocuni">antocuni</span> <span class="chatlog__timestamp" title="05 October 2023 14:11"><a href="#chatlog__message-container-1159477935326109736">05/10/2023 14:11</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">that would be awesome!</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1159477987176104007" id="chatlog__message-container-1159477987176104007"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="05 October 2023 14:11"><a href="#chatlog__message-container-1159477987176104007">05/10/2023 14:11</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">On it.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1160641181223493844" id="chatlog__message-container-1160641181223493844"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/443087a917605fc34785eff688dde49e.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="704401898047930468" title="fabiano.py">Fabiano.py</span> <span class="chatlog__timestamp" title="08 October 2023 19:13"><a href="#chatlog__message-container-1160641181223493844">08/10/2023 19:13</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Help What I liked most about pyscript was using Element instead of the Document method: getElementById() in the new version of pyscript will Element still work? The question is, will I return the element natively?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1160645731389026304" id="chatlog__message-container-1160645731389026304"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="688046964549353491" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</span> <span class="chatlog__timestamp" title="08 October 2023 19:31"><a href="#chatlog__message-container-1160645731389026304">08/10/2023 19:31</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">So <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">Element</code> has been subsumed into the new <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pydom</code> package, which you can check out here: <a href="https://github.com/pyscript/pyscript/blob/main/pyscript.core/src/stdlib/pyweb/pydom.py">https://github.com/pyscript/pyscript/blob/main/pyscript.core/src/stdlib/pyweb/pydom.py</a></span></div><div class="chatlog__embed"><div class="chatlog__embed-color-pill" style="background-color:rgba(30,35,39,255)"></div><div class="chatlog__embed-content-container"><div class="chatlog__embed-content"><div class="chatlog__embed-text"><div class="chatlog__embed-title"><a class="chatlog__embed-title-link" href="https://github.com/pyscript/pyscript/blob/main/pyscript.core/src/stdlib/pyweb/pydom.py"><div class="chatlog__markdown chatlog__markdown-preserve">pyscript/pyscript.core/src/stdlib/pyweb/pydom.py at main · pyscript...</div></a></div><div class="chatlog__embed-description"><div class="chatlog__markdown chatlog__markdown-preserve">Home Page: <a href="https://pyscript.net">https://pyscript.net</a> Examples: <a href="https://pyscript.net/examples">https://pyscript.net/examples</a> - pyscript/pyscript</div></div></div><div class="chatlog__embed-thumbnail-container"><a class="chatlog__embed-thumbnail-link" href="https://images-ext-1.discordapp.net/external/7x8NgXo7SOgP9e7qGS0p-T4SVFoOFmfQBMfdXutTtUg/https/opengraph.githubassets.com/e6ab51e4551a5d3a07738660138c80a02ae21c76e1327582903ee174b22a25d4/pyscript/pyscript"> <img alt="Thumbnail" class="chatlog__embed-thumbnail" loading="lazy" src="https://images-ext-1.discordapp.net/external/7x8NgXo7SOgP9e7qGS0p-T4SVFoOFmfQBMfdXutTtUg/https/opengraph.githubassets.com/e6ab51e4551a5d3a07738660138c80a02ae21c76e1327582903ee174b22a25d4/pyscript/pyscript"/> </a></div></div></div></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="slight_smile"><img alt="🙂" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f642.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div><div class="chatlog__message-container" data-message-id="1160645793066274927" id="chatlog__message-container-1160645793066274927"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="08 October 2023 19:32">19:32</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Not entirely sure what you’re asking about returning the element natively</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1160713187646263357" id="chatlog__message-container-1160713187646263357"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/443087a917605fc34785eff688dde49e.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1160645731389026304')"> So <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">Element</code> has been subsumed into the new <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pydom</code> package, which you can check out here: <a href="https://github.com/pyscript/pyscript/blob/main/pyscript.core/src/stdlib/pyweb/pydom.py">https://github.com/pyscript/pyscript/blob/main/pyscript.core/src/stdlib/pyweb/pydom.py</a> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="704401898047930468" title="fabiano.py">Fabiano.py</span> <span class="chatlog__timestamp" title="08 October 2023 23:59"><a href="#chatlog__message-container-1160713187646263357">08/10/2023 23:59</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">First of all, thanks for the answer: I asked the question because I changed the default cdn to 2023.09.1.RC2/core
In old codes that have Element,display, target=, @when('click','#btn')
Just to test and also to update the ones I have here and I received the error:
Uncaught PythonError: Traceback (last most recent call):
File "/home/pyodide/pyscript/event_handling.py", line 36, in the wrapper
function()
File "<exec>", line 7, in summary
NameError: name 'Element' is not defined</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1160722829092855909" id="chatlog__message-container-1160722829092855909"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/443087a917605fc34785eff688dde49e.png"/><div class="chatlog__reply-author" title="fabiano.py">Fabiano.py</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1160713187646263357')"> First of all, thanks for the answer: I asked the question because I changed the default cdn to 2023.09.1.RC2/core
In old codes that have Element,display, target=, @when('click','#btn')
Just to test and also to update the ones I have here and I received the error:
Uncaught PythonError: Traceback (last most recent call):
File "/home/pyodide/pyscript/event_handling.py", line 36, in the wrapper
function()
File "<exec>", line 7, in summary
NameError: name 'Element' is not defined </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="688046964549353491" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</span> <span class="chatlog__timestamp" title="09 October 2023 00:38"><a href="#chatlog__message-container-1160722829092855909">09/10/2023 00:38</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Did you do <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">from pydom import Element</code>? I do think (1) we removed some of the names from being imported automatically and (2) Element is now in the <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pydom</code> package</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1160780554304757800" id="chatlog__message-container-1160780554304757800"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/443087a917605fc34785eff688dde49e.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1160722829092855909')"> Did you do <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">from pydom import Element</code>? I do think (1) we removed some of the names from being imported automatically and (2) Element is now in the <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pydom</code> package </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="704401898047930468" title="fabiano.py">Fabiano.py</span> <span class="chatlog__timestamp" title="09 October 2023 04:27"><a href="#chatlog__message-container-1160780554304757800">09/10/2023 04:27</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Ok, I got it <img alt="🙂" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f642.svg" title="slight_smile"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1160856347743637626" id="chatlog__message-container-1160856347743637626"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="09 October 2023 09:28"><a href="#chatlog__message-container-1160856347743637626">09/10/2023 09:28</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Yeah... so after a LOT of discussion we decided to NOT automatically import special things. That's a choice for the developer to make, so just <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">from pyscript.pydom import Element</code> (remembering off the top of my head here - please check the namespaces).</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1161102001476743168" id="chatlog__message-container-1161102001476743168"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/443087a917605fc34785eff688dde49e.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/><div class="chatlog__reply-author" style="color:rgb(233,102,11)" title="ntoll">ntoll</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1160856347743637626')"> Yeah... so after a LOT of discussion we decided to NOT automatically import special things. That's a choice for the developer to make, so just <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">from pyscript.pydom import Element</code> (remembering off the top of my head here - please check the namespaces). </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="704401898047930468" title="fabiano.py">Fabiano.py</span> <span class="chatlog__timestamp" title="10 October 2023 01:44"><a href="#chatlog__message-container-1161102001476743168">10/10/2023 01:44</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I apologize for my mistake. I went to help pyscript thinking it was an error, there I was informed about the documentation and then I ended up here. Apologies again.<img alt="🙂" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f642.svg" title="slight_smile"/></span> <span class="chatlog__edited-timestamp" title="10 October 2023 01:55">(edited)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1161220636358754304" id="chatlog__message-container-1161220636358754304"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="10 October 2023 09:36"><a href="#chatlog__message-container-1161220636358754304">10/10/2023 09:36</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">No need to apologise! <img alt="👍" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/> I spend most of my day as an engineer asking myself, "why on earth doesn't this work?". <img alt="😁" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f601.svg" title="grin"/></span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="slight_smile"><img alt="🙂" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f642.svg"/> <span class="chatlog__reaction-count">1</span></div><div class="chatlog__reaction" title="laughing"><img alt="😆" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f606.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1166630613416161382" id="chatlog__message-container-1166630613416161382"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6bfba11493997c0826582ed6912a1089.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/><div class="chatlog__reply-author" style="color:rgb(233,102,11)" title="ntoll">ntoll</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1161220636358754304')"> No need to apologise! <img alt="👍" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/> I spend most of my day as an engineer asking myself, "why on earth doesn't this work?". <img alt="😁" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f601.svg" title="grin"/> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="546336524426280976" title="holdenweb">holdenweb</span> <span class="chatlog__timestamp" title="25 October 2023 07:53"><a href="#chatlog__message-container-1166630613416161382">25/10/2023 07:53</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">One of the potentially depressing things about being a developer is the continual reminder we aren't as smart as we think we are!</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1166630764788592701" id="chatlog__message-container-1166630764788592701"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="25 October 2023 07:54">07:54</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I find after fifty years or so you eventually get. used to it.</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="laughing"><img alt="😆" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f606.svg"/> <span class="chatlog__reaction-count">2</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1167115170372399207" id="chatlog__message-container-1167115170372399207"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="26 October 2023 15:59"><a href="#chatlog__message-container-1167115170372399207">26/10/2023 15:59</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Amen brother... <img alt="🙂" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f642.svg" title="slight_smile"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1195098950567477339" id="chatlog__message-container-1195098950567477339"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/ad7c4763dbb93f4fedddcf034432f1fe.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1018137149285093437" title="adinsoftic">AdinSoftic</span> <span class="chatlog__timestamp" title="11 January 2024 20:16"><a href="#chatlog__message-container-1195098950567477339">11/01/2024 20:16</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I think it would be great to create GPTs Assistant for the documentation and generating examples. I saw it with CrewAI project (not related at all) and found it realy easy and helpful for the newbies (me).</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1195315859711860766" id="chatlog__message-container-1195315859711860766"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="12 January 2024 10:38"><a href="#chatlog__message-container-1195315859711860766">12/01/2024 10:38</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="adinsoftic">@AdinSoftic</span> thank you for the suggestion. I'm intrigued, how should we best reveal this sort of thing to our users? Do you have examples of good practice in this area? (You mention CrewAI - can you point me somewhere via a URL?)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1195320760500224040" id="chatlog__message-container-1195320760500224040"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/ad7c4763dbb93f4fedddcf034432f1fe.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/><div class="chatlog__reply-author" style="color:rgb(233,102,11)" title="ntoll">ntoll</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1195315859711860766')"> <span class="chatlog__markdown-mention" title="adinsoftic">@AdinSoftic</span> thank you for the suggestion. I'm intrigued, how should we best reveal this sort of thing to our users? Do you have examples of good practice in this area? (You mention CrewAI - can you point me somewhere via a URL?) </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1018137149285093437" title="adinsoftic">AdinSoftic</span> <span class="chatlog__timestamp" title="12 January 2024 10:57"><a href="#chatlog__message-container-1195320760500224040">12/01/2024 10:57</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">They put the link to the custom gpt in their git with the text Talk with the Docs
<a href="https://github.com/joaomdmoura/crewAI">https://github.com/joaomdmoura/crewAI</a></span></div><div class="chatlog__embed"><div class="chatlog__embed-color-pill" style="background-color:rgba(30,35,39,255)"></div><div class="chatlog__embed-content-container"><div class="chatlog__embed-content"><div class="chatlog__embed-text"><div class="chatlog__embed-title"><a class="chatlog__embed-title-link" href="https://github.com/joaomdmoura/crewAI"><div class="chatlog__markdown chatlog__markdown-preserve">GitHub - joaomdmoura/crewAI: Framework for orchestrating role-playi...</div></a></div><div class="chatlog__embed-description"><div class="chatlog__markdown chatlog__markdown-preserve">Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewAI empowers agents to work together seamlessly, tackling complex tasks. - GitHub - joaom...</div></div></div><div class="chatlog__embed-thumbnail-container"><a class="chatlog__embed-thumbnail-link" href="https://images-ext-1.discordapp.net/external/AYYZKSQL648g54_jCFze20bSgm2g2BzicyQwPdx7I7A/https/opengraph.githubassets.com/30c38f945c78e3ba19216cda6d35e10b1b968702eceb6cd88aeef1b55127d0f8/joaomdmoura/crewAI"> <img alt="Thumbnail" class="chatlog__embed-thumbnail" loading="lazy" src="https://images-ext-1.discordapp.net/external/AYYZKSQL648g54_jCFze20bSgm2g2BzicyQwPdx7I7A/https/opengraph.githubassets.com/30c38f945c78e3ba19216cda6d35e10b1b968702eceb6cd88aeef1b55127d0f8/joaomdmoura/crewAI"/> </a></div></div></div></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211380092849102920" id="chatlog__message-container-1211380092849102920"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="25 February 2024 18:32"><a href="#chatlog__message-container-1211380092849102920">25/02/2024 18:32</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Does Pyscript have an API reference? I was looking through the documentation but couldn't find anything, except for links to the JavaScript API reference on MDN.</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1211380351293722745" id="chatlog__message-container-1211380351293722745"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="25 February 2024 18:33">18:33</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">For example, I want to look up how a <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch</code> call would look from Python, including what to import to get access to it, and what types it expects, which Exceptions it might raise, etc. Is this written down somewhere?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211406288693493760" id="chatlog__message-container-1211406288693493760"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/><div class="chatlog__reply-author" title="dagusiu">Dagusiu</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1211380351293722745')"> For example, I want to look up how a <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch</code> call would look from Python, including what to import to get access to it, and what types it expects, which Exceptions it might raise, etc. Is this written down somewhere? </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="25 February 2024 20:16"><a href="#chatlog__message-container-1211406288693493760">25/02/2024 20:16</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch</code> is documented in the MDN docs. You access the browser based APIs (in which <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch</code> is found) via the FFI. E.g. <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">from pyscript import document</code> gives you the document object from the browser.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211413088264257566" id="chatlog__message-container-1211413088264257566"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="25 February 2024 20:43"><a href="#chatlog__message-container-1211413088264257566">25/02/2024 20:43</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">But where do I get the actual <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch</code> function into Python land? Do I do <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">from pyscript import fetch</code>, or is it part of the document object, or something else? That's the part that's confusing me, and as far as I can tell, it's not documented anywhere.</span> <span class="chatlog__edited-timestamp" title="25 February 2024 21:49">(edited)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211523391090196530" id="chatlog__message-container-1211523391090196530"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/><div class="chatlog__reply-author" title="dagusiu">Dagusiu</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1211413088264257566')"> But where do I get the actual <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch</code> function into Python land? Do I do <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">from pyscript import fetch</code>, or is it part of the document object, or something else? That's the part that's confusing me, and as far as I can tell, it's not documented anywhere. </span> <span class="chatlog__reply-edited-timestamp" title="25 February 2024 21:49">(edited)</span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="688046964549353491" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</span> <span class="chatlog__timestamp" title="26 February 2024 04:01"><a href="#chatlog__message-container-1211523391090196530">26/02/2024 04:01</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">You’ll want to do <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">from pyscript import window</code>, followed by <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">window.fetch(…)</code>. Window, in this case, is a direct proxy of the JS global namespace. More specifically, it’s the main thread’s global namespace, even if you’re running pyscript in a worker</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1211523560443486240" id="chatlog__message-container-1211523560443486240"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="26 February 2024 04:02">04:02</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">If you’re running in a worker and you need access to the worker’s global namespace for some reason, you can do <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">from js import fetch</code>.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211541250902065162" id="chatlog__message-container-1211541250902065162"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="26 February 2024 05:12"><a href="#chatlog__message-container-1211541250902065162">26/02/2024 05:12</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Thanks! That explains a lot. Maybe adding one or two examples of that in the documentation could be a good idea.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211541488962379816" id="chatlog__message-container-1211541488962379816"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="688046964549353491" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</span> <span class="chatlog__timestamp" title="26 February 2024 05:13"><a href="#chatlog__message-container-1211541488962379816">26/02/2024 05:13</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">For sure! I also maintain a side-reference called pyscript.recipes with some more exacmple, including stuff like this <a href="https://pyscript.recipes/2024.1.1/js-integration/import-js/">https://pyscript.recipes/2024.1.1/js-integration/import-js/</a></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211550913559273512" id="chatlog__message-container-1211550913559273512"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="26 February 2024 05:50"><a href="#chatlog__message-container-1211550913559273512">26/02/2024 05:50</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">How do I know which Python exceptions these FFI calls can raise? Is that documented anywhere?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211593692197163028" id="chatlog__message-container-1211593692197163028"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="26 February 2024 08:40"><a href="#chatlog__message-container-1211593692197163028">26/02/2024 08:40</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="jeffglass">@Jeff Glass</span> Does this page need a polyscript to pyscript update ? <a href="https://pyscript.recipes/2024.1.1/js-integration/js-modules/">https://pyscript.recipes/2024.1.1/js-integration/js-modules/</a></span></div><div class="chatlog__embed"><div class="chatlog__embed-color-pill chatlog__embed-color-pill--default"></div><div class="chatlog__embed-content-container"><div class="chatlog__embed-content"><div class="chatlog__embed-text"><div class="chatlog__embed-title"><a class="chatlog__embed-title-link" href="https://pyscript.recipes/2024.1.1/js-integration/js-modules/"><div class="chatlog__markdown chatlog__markdown-preserve">Importing JS Modules - pyscript.recipes</div></a></div><div class="chatlog__embed-description"><div class="chatlog__markdown chatlog__markdown-preserve">None</div></div></div><div class="chatlog__embed-thumbnail-container"><a class="chatlog__embed-thumbnail-link" href="https://images-ext-1.discordapp.net/external/3hOSw3y_pJqpXb3AQocI6g9un18VhbaDKvpZTPAz5cQ/https/pyscript.recipes/2024.1.1/assets/images/social/js-integration/js-modules.png"> <img alt="Thumbnail" class="chatlog__embed-thumbnail" loading="lazy" src="https://images-ext-1.discordapp.net/external/3hOSw3y_pJqpXb3AQocI6g9un18VhbaDKvpZTPAz5cQ/https/pyscript.recipes/2024.1.1/assets/images/social/js-integration/js-modules.png"/> </a></div></div></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211595039776575488" id="chatlog__message-container-1211595039776575488"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/><div class="chatlog__reply-author" title="neon22.">Neon22</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1211593692197163028')"> <span class="chatlog__markdown-mention" title="jeffglass">@Jeff Glass</span> Does this page need a polyscript to pyscript update ? <a href="https://pyscript.recipes/2024.1.1/js-integration/js-modules/">https://pyscript.recipes/2024.1.1/js-integration/js-modules/</a> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="26 February 2024 08:46"><a href="#chatlog__message-container-1211595039776575488">26/02/2024 08:46</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I find this explicit enough but true that a replace in there would also work these days <img alt="👍" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/></span></div><div class="chatlog__attachment"><a href="https://cdn.discordapp.com/attachments/1037014340802453615/1211595039596085298/Screenshot_from_2024-02-26_09-45-34.png?ex=691c324f&is=691ae0cf&hm=a429e2244ad10deb6de35bd5188875f4242c0f948e751ce2f08ac020fce832f1&"> <img alt="Image attachment" class="chatlog__attachment-media" loading="lazy" src="assets/Screenshot_from_2024-02-26_09-45-34.png" title="Image: Screenshot_from_2024-02-26_09-45-34.png (10.79 KB)"/> </a></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211595331008077824" id="chatlog__message-container-1211595331008077824"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="26 February 2024 08:47"><a href="#chatlog__message-container-1211595331008077824">26/02/2024 08:47</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">always an issue with docs in a fast changin environment. but we all appreciate the efforts</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211606953667731496" id="chatlog__message-container-1211606953667731496"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="26 February 2024 09:33"><a href="#chatlog__message-container-1211606953667731496">26/02/2024 09:33</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="dagusiu">@Dagusiu</span> my apologies for not being more clear (I was typing quickly while checking weekend discord), and huge thanks (as always) to <span class="chatlog__markdown-mention" title="jeffglass">@Jeff Glass</span> for stepping in with a clear and concise answer. Thanks for the docs suggestions, we'll take them on board. To be honest <span class="chatlog__markdown-mention" title="fpliger">@Fabio</span> is working on a Python library that should just abstract away all the JS stuff. But it's early days (as is most things WRT PyScript). Hence your feedback is <em>really</em> welcome and helpful..! <img alt="🚀" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f680.svg" title="rocket"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211617706110095380" id="chatlog__message-container-1211617706110095380"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/><div class="chatlog__reply-author" style="color:rgb(233,102,11)" title="ntoll">ntoll</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1211606953667731496')"> <span class="chatlog__markdown-mention" title="dagusiu">@Dagusiu</span> my apologies for not being more clear (I was typing quickly while checking weekend discord), and huge thanks (as always) to <span class="chatlog__markdown-mention" title="jeffglass">@Jeff Glass</span> for stepping in with a clear and concise answer. Thanks for the docs suggestions, we'll take them on board. To be honest <span class="chatlog__markdown-mention" title="fpliger">@Fabio</span> is working on a Python library that should just abstract away all the JS stuff. But it's early days (as is most things WRT PyScript). Hence your feedback is <em>really</em> welcome and helpful..! <img alt="🚀" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f680.svg" title="rocket"/> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="26 February 2024 10:16"><a href="#chatlog__message-container-1211617706110095380">26/02/2024 10:16</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">There is absolutely no need to apologize, I'm just glad to get quick answers to my questions and I'm glad I can help.
I was also thinking about maybe creating a stub library in python, where all the web APIs are "implemented" (as in, they exist with the correct type hints and some useful docstrings) but only throw a <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">NotImplementedException</code> when called. Having such a stub library would allow you to have a better developer experience in modern IDEs like VS Code and tools like mypy. But if you're going to wrap all the web stuff in a Python library, that might not be needed?</span> <span class="chatlog__edited-timestamp" title="26 February 2024 14:48">(edited)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211618432974589995" id="chatlog__message-container-1211618432974589995"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="26 February 2024 10:19"><a href="#chatlog__message-container-1211618432974589995">26/02/2024 10:19</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="dagusiu">@Dagusiu</span> always happy to help. Just want to manage expectations (this is a relatively young project). <img alt="😉" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f609.svg" title="wink"/> But because of its "youth" there's also lots of cool stuff that folks can do to help build things out. <span class="chatlog__markdown-mention" title="fpliger">@Fabio</span> is the person to talk to about the Pythonic "web api" wrapper. But I can say with some certainty (because it's what we all agree on), our approach is collaborative and open, so comments, suggestions and constructive critique is always welcome.</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="heart"><img alt="❤️" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/2764.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211725585987145738" id="chatlog__message-container-1211725585987145738"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/3.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1032028422710505543" style="color:rgb(233,102,11)" title="fpliger">Fabio</span> <span class="chatlog__timestamp" title="26 February 2024 17:24"><a href="#chatlog__message-container-1211725585987145738">26/02/2024 17:24</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="dagusiu">@Dagusiu</span> thanks for the topic, this is great discussion and very valuable!
In terms of creating a stub module, I think we should chat and clarify what you had in mind vs what I'm currently working on because I really think there's a lot of potential for the 2 things to overlap and I would definitely love help <img alt="🙂" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f642.svg" title="slight_smile"/>
My goal is not to map everything (it's massive) but parts of it as pythonic as possible</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1211733099076124693" id="chatlog__message-container-1211733099076124693"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="26 February 2024 17:54"><a href="#chatlog__message-container-1211733099076124693">26/02/2024 17:54</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="fpliger">@Fabio</span> That makes a lot of sense. No point in two separate projects that try to mostly solve the same goal (albeit in very different ways).
What would be a good channel to talk more about it? Maybe <span class="chatlog__markdown-mention">#╰╸pyscript-collective</span> ? Or just <span class="chatlog__markdown-mention">#╰╸chat</span> ?</span> <span class="chatlog__edited-timestamp" title="26 February 2024 17:58">(edited)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1213743642947358770" id="chatlog__message-container-1213743642947358770"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="03 March 2024 07:03"><a href="#chatlog__message-container-1213743642947358770">03/03/2024 07:03</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">A very concrete example of why Python specific documentation of the web APIs would be useful: I just spent a full hour trying to get a HTTP POST working over <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch</code>. After messing around a lot, it turns out that <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch</code> in Python takes its options as kwargs, rather than taking it as a dictionary (in JavaScript, the options to a <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch</code> are typically provided as a JavaScript object, which I assumed would translate as a Python dictionary, but this assumption turned out to be wrong).</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1213744235711430686" id="chatlog__message-container-1213744235711430686"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="03 March 2024 07:06">07:06</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I am building a small .pyi file for pyscript, which can handle the APIs I care about, but writing this without Python specific documentation is a challenge. I will try to figure out a good way to share this pyi file, so that others won't need to duplicate my efforts</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1213865622333558794" id="chatlog__message-container-1213865622333558794"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1b0454229d426f3c2f62a741361aed9a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="409188695132995584" title="phelsong">Phelsong (Josh)</span> <span class="chatlog__timestamp" title="03 March 2024 15:08"><a href="#chatlog__message-container-1213865622333558794">03/03/2024 15:08</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">that's a pyodide thing. I personally think that's the hardest thing about pyscript, just determining WHERE to even look... the pyodide docs clearly say kwargs, but it's not super obvious that's where you should have looked.
<a href="https://pyodide.org/en/stable/usage/api/python-api/http.html">https://pyodide.org/en/stable/usage/api/python-api/http.html</a></span></div></div></div></div><div class="chatlog__message-container" data-message-id="1213865784590204979" id="chatlog__message-container-1213865784590204979"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="03 March 2024 15:09">15:09</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">to find the available params, you then need to look at the JS fetch api and match them.</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1213865876428689418" id="chatlog__message-container-1213865876428689418"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="03 March 2024 15:09">15:09</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="dagusiu">@Dagusiu</span></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1213866966042021970" id="chatlog__message-container-1213866966042021970"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="03 March 2024 15:13"><a href="#chatlog__message-container-1213866966042021970">03/03/2024 15:13</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">What's interesting is that I did look there, but I figured that it was a different function altogether, because in Pyscript it's called "fetch" while this one is called "pyfetch". If Pyscript is the one who changed the name, I still think it's Pyscript's responsibility to document it. Just a single note somewhere that the fetch function is actually pyodide's pyfetch function would have solved the problem immediately.
That said, I fully understand why this is not the case (yet), Pyscript is young and still unstable in several ways. I hope this doesn't come off as entitled or whiney.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1213868373637865514" id="chatlog__message-container-1213868373637865514"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1b0454229d426f3c2f62a741361aed9a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="409188695132995584" title="phelsong">Phelsong (Josh)</span> <span class="chatlog__timestamp" title="03 March 2024 15:19"><a href="#chatlog__message-container-1213868373637865514">03/03/2024 15:19</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">pyscript doesn't have a native fetch that i'm aware of?</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1213869133133783082" id="chatlog__message-container-1213869133133783082"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="03 March 2024 15:22">15:22</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">that to say, w/e implementation is a JS wrapper and is going to function the same way</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1213904860894863510" id="chatlog__message-container-1213904860894863510"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/><div class="chatlog__reply-author" title="dagusiu">Dagusiu</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1213866966042021970')"> What's interesting is that I did look there, but I figured that it was a different function altogether, because in Pyscript it's called "fetch" while this one is called "pyfetch". If Pyscript is the one who changed the name, I still think it's Pyscript's responsibility to document it. Just a single note somewhere that the fetch function is actually pyodide's pyfetch function would have solved the problem immediately.
That said, I fully understand why this is not the case (yet), Pyscript is young and still unstable in several ways. I hope this doesn't come off as entitled or whiney. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="688046964549353491" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</span> <span class="chatlog__timestamp" title="03 March 2024 17:44"><a href="#chatlog__message-container-1213904860894863510">03/03/2024 17:44</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Yeah as far as I know, PyScript doesn’t shadow <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch</code> - can you share a sample of your code?</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1213905001458434158" id="chatlog__message-container-1213905001458434158"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="03 March 2024 17:45">17:45</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Not that there aren’t things we could do to help folks find the right resources, just curious about this specific case as well <img alt="👍" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1213907922007101501" id="chatlog__message-container-1213907922007101501"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="03 March 2024 17:56"><a href="#chatlog__message-container-1213907922007101501">03/03/2024 17:56</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Sure. I'm not quite ready to make my own project open source yet (still haven't decided on a suitable license for it) but give me a day or so and I'll make a minimal example to showcase what's going on (that's probably more helpful anyway). That also doubles as an easy way to share and demonstrate the (very limited) process I've made towards my pyi file for pyscript</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1213921368131895427" id="chatlog__message-container-1213921368131895427"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="688046964549353491" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</span> <span class="chatlog__timestamp" title="03 March 2024 18:50"><a href="#chatlog__message-container-1213921368131895427">03/03/2024 18:50</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">That sounds perfect - yeah if you’re able to come up with a short snippet that shows what’s happening, that’d be super helpful</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1213957167900659782" id="chatlog__message-container-1213957167900659782"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="03 March 2024 21:12"><a href="#chatlog__message-container-1213957167900659782">03/03/2024 21:12</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Check out this repository:
<a href="https://github.com/ahrnbom/pyscript-litestar-demo">https://github.com/ahrnbom/pyscript-litestar-demo</a>
In particular, right here:
<a href="https://github.com/ahrnbom/pyscript-litestar-demo/blob/d111d57652586b19cc176aa5e16dbc2763a8c0e1/demo/client/client.py#L36">https://github.com/ahrnbom/pyscript-litestar-demo/blob/d111d57652586b19cc176aa5e16dbc2763a8c0e1/demo/client/client.py#L36</a>
Based on the Javascript API, I would have expected this to instead be
<code class="chatlog__markdown-pre chatlog__markdown-pre--multiline nohighlight">response = await window.fetch(
path,
{
"body": json_str,
"cache": "no-cache",
"method": "POST",
},
)</code>
but that does not work. If you try it, the options will be ignored, and a HTTP GET request will instead be sent (which does not work).
If you want to try that yourself, you'd need to either disable mypy or modify the pyi file</span> <span class="chatlog__edited-timestamp" title="03 March 2024 21:19">(edited)</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1213957194882490379" id="chatlog__message-container-1213957194882490379"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="03 March 2024 21:12">21:12</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="jeffglass">@Jeff Glass</span></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1213958994281103411" id="chatlog__message-container-1213958994281103411"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="03 March 2024 21:19"><a href="#chatlog__message-container-1213958994281103411">03/03/2024 21:19</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Furthermore, I created a branch with that behaviour, for you to try out: <a href="https://github.com/ahrnbom/pyscript-litestar-demo/pull/1">https://github.com/ahrnbom/pyscript-litestar-demo/pull/1</a></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1213999650777079839" id="chatlog__message-container-1213999650777079839"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1b0454229d426f3c2f62a741361aed9a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="409188695132995584" title="phelsong">Phelsong (Josh)</span> <span class="chatlog__timestamp" title="04 March 2024 00:01"><a href="#chatlog__message-container-1213999650777079839">04/03/2024 00:01</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">i don't think a dict can directly be serialized to a JS object... you'd need a layer to create a new prototype instance first</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1214000869348212837" id="chatlog__message-container-1214000869348212837"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="04 March 2024 00:06">00:06</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">the framework i'm working on is almost identical to what your demo is doing <a href="https://github.com/Phelsong/Senza">https://github.com/Phelsong/Senza</a></span></div><div class="chatlog__embed"><div class="chatlog__embed-color-pill" style="background-color:rgba(30,35,39,255)"></div><div class="chatlog__embed-content-container"><div class="chatlog__embed-content"><div class="chatlog__embed-text"><div class="chatlog__embed-title"><a class="chatlog__embed-title-link" href="https://github.com/Phelsong/Senza"><div class="chatlog__markdown chatlog__markdown-preserve">GitHub - Phelsong/Senza</div></a></div><div class="chatlog__embed-description"><div class="chatlog__markdown chatlog__markdown-preserve">Contribute to Phelsong/Senza development by creating an account on GitHub.</div></div></div><div class="chatlog__embed-thumbnail-container"><a class="chatlog__embed-thumbnail-link" href="https://images-ext-1.discordapp.net/external/Ts5hA-EeywCt8vVwNDfY-su3gwPfpNGrtJXfcWgwfUI/https/opengraph.githubassets.com/c2e4cbcaba82b7940be4904dc81feebd7c0bb54854105df6f9214cfc5a59963a/Phelsong/Senza"> <img alt="Thumbnail" class="chatlog__embed-thumbnail" loading="lazy" src="https://images-ext-1.discordapp.net/external/Ts5hA-EeywCt8vVwNDfY-su3gwPfpNGrtJXfcWgwfUI/https/opengraph.githubassets.com/c2e4cbcaba82b7940be4904dc81feebd7c0bb54854105df6f9214cfc5a59963a/Phelsong/Senza"/> </a></div></div></div></div></div></div></div><div class="chatlog__message-container" data-message-id="1214000942626770964" id="chatlog__message-container-1214000942626770964"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="04 March 2024 00:06">00:06</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">if there is anything in there that helps</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1214002146903719958" id="chatlog__message-container-1214002146903719958"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="04 March 2024 00:11">00:11</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">some stuff is still a little jank, i'm working in an active project and transplanting pieces</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1214082231568437338" id="chatlog__message-container-1214082231568437338"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="04 March 2024 05:29"><a href="#chatlog__message-container-1214082231568437338">04/03/2024 05:29</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I think the thing that would help would be if Pyscript's documentation would detail exactly how the translation of Javascript APIs to Python works. I don't need any particular help in this case, since I have figured out how it works, my point is just that it was difficult to understand how it works because it's not documented</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1214083349023424572" id="chatlog__message-container-1214083349023424572"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="04 March 2024 05:33">05:33</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">like, when I read Pyscript's documentation on Web APIs, it's only linking to MDN's Javascript documentation, with no explanation of how to translate these APIs to Python. And this example shows that this translation is non-trivial, so some kind of explanation of how it works would be very helpful</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1220409052572422225" id="chatlog__message-container-1220409052572422225"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/cedb09d1f845185d74cf4fd7d3c906c7.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="244229987723378688" title="jimena_eb">Jimena</span> <span class="chatlog__timestamp" title="21 March 2024 16:29"><a href="#chatlog__message-container-1220409052572422225">21/03/2024 16:29</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Hi friends!
I going to give a talk about PyScript and I want to be sure that my scheme is correct. I investigated all the docs and I think it's very accurate, but what do you think?</span></div><div class="chatlog__attachment"><a href="https://cdn.discordapp.com/attachments/1037014340802453615/1220409052371226664/SmartSelect_20240321_172849_Slides.jpg?ex=691bf640&is=691aa4c0&hm=f1bb76563aa9b8b182eb51e19daf608ce79e66bff420ffec7d3324335c0f358e&"> <img alt="Image attachment" class="chatlog__attachment-media" loading="lazy" src="assets/SmartSelect_20240321_172849_Slides.jpg" title="Image: SmartSelect_20240321_172849_Slides.jpg (30.64 KB)"/> </a></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1220411047492718672" id="chatlog__message-container-1220411047492718672"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="21 March 2024 16:37"><a href="#chatlog__message-container-1220411047492718672">21/03/2024 16:37</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="jimena_eb">@Jimena</span> hey hey... congratulations on the talk, and thank you for talking about PyScript..! It looks good to me. Just a suggestion, and please feel free to ignore me, you know how you have "Numpy" next to PyScript (showing that Numpy belongs in the PyScript world)? Perhaps put "DOM" or something next to "JS" to show that you have access to the DOM and other browser APIs in <em>that</em> world via the FFI..? But what you have definitely LGTM <img alt="🚀" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f680.svg" title="rocket"/></span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div><div class="chatlog__message-container" data-message-id="1220412611108147323" id="chatlog__message-container-1220412611108147323"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="21 March 2024 16:44">16:44</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Please do share details of the talk too..! <img alt="👍" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1220716194563096656" id="chatlog__message-container-1220716194563096656"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/cedb09d1f845185d74cf4fd7d3c906c7.png"/><div class="chatlog__reply-author" title="jimena_eb">Jimena</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1220409052572422225')"> Hi friends!
I going to give a talk about PyScript and I want to be sure that my scheme is correct. I investigated all the docs and I think it's very accurate, but what do you think? </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="22 March 2024 12:50"><a href="#chatlog__message-container-1220716194563096656">22/03/2024 12:50</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">when it comes to Polyscript itself it works with Lua too (Wasmoon) and technically any WASM targeting PL + it provides some high level API or feature via configuration, the FFI is instead provided by each individual interpreter. The chart looks good though, but we also work on WebKitCore (the engine behind Safari and WebKit based browsers) ... and what Nicholas said too <img alt="😉" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f609.svg" title="wink"/></span> <span class="chatlog__edited-timestamp" title="22 March 2024 12:51">(edited)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1221480083651432630" id="chatlog__message-container-1221480083651432630"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/96909edf73b13072aa23864d88545608.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1098917963081449555" title="chris.laffra">chris.laffra</span> <span class="chatlog__timestamp" title="24 March 2024 15:25"><a href="#chatlog__message-container-1221480083651432630">24/03/2024 15:25</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="jimena_eb">@Jimena</span> Great to hear you are going to do a talk on PyScript. Where will the talk be done? If you have not seen it yet, you may want to watch a talk I did at PyData Eindhoven in December: <a href="https://www.youtube.com/watch?v=5nseG-iU62g">https://www.youtube.com/watch?v=5nseG-iU62g</a></span></div><div class="chatlog__embed"><div class="chatlog__embed-color-pill" style="background-color:rgba(255,0,0,255)"></div><div class="chatlog__embed-content-container"><div class="chatlog__embed-content"><div class="chatlog__embed-text"><div class="chatlog__embed-author-container"><a class="chatlog__embed-author-link" href="https://www.youtube.com/channel/UCOjD18EJYcsBog4IozkF_7w"><div class="chatlog__embed-author">PyData</div></a></div><div class="chatlog__embed-title"><a class="chatlog__embed-title-link" href="https://www.youtube.com/watch?v=5nseG-iU62g"><div class="chatlog__markdown chatlog__markdown-preserve">Chris Laffra - PyScript - Python in the browser</div></a></div><div class="chatlog__embed-youtube-container"><iframe class="chatlog__embed-youtube" height="225" src="https://www.youtube.com/embed/5nseG-iU62g" width="400"></iframe></div></div></div></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1221755135009624074" id="chatlog__message-container-1221755135009624074"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="893438881331036191" title="andrew_vr_d">AndrewD</span> <span class="chatlog__timestamp" title="25 March 2024 09:38"><a href="#chatlog__message-container-1221755135009624074">25/03/2024 09:38</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">So, i was trying to use fetch(), but it didn't seem to work the way it was documented on pyscript.net.
I was just digging around on GitHub and realised the public docs are documenting a very recent change that is not in 2024.3.1.
Is there an intention that the docs are for the release, or is that more of a work in progress?
PS: pyscript is cool <img alt="😎" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f60e.svg" title="sunglasses"/> i built a skeleton of a client server website with fastAPI and pyscript in a few hours as my first experiment in web for a long time.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1221769950419488930" id="chatlog__message-container-1221769950419488930"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/><div class="chatlog__reply-author" title="andrew_vr_d">AndrewD</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1221755135009624074')"> So, i was trying to use fetch(), but it didn't seem to work the way it was documented on pyscript.net.
I was just digging around on GitHub and realised the public docs are documenting a very recent change that is not in 2024.3.1.
Is there an intention that the docs are for the release, or is that more of a work in progress?
PS: pyscript is cool <img alt="😎" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f60e.svg" title="sunglasses"/> i built a skeleton of a client server website with fastAPI and pyscript in a few hours as my first experiment in web for a long time. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="25 March 2024 10:37"><a href="#chatlog__message-container-1221769950419488930">25/03/2024 10:37</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">If you want a concrete example of using fetch with Pyscript, the way it was prior to that change, you can check out this repo: <a href="https://github.com/ahrnbom/pyscript-litestar-demo">https://github.com/ahrnbom/pyscript-litestar-demo</a>
It uses Litestar instead of FastAPI, but they're very similar</span></div><div class="chatlog__embed"><div class="chatlog__embed-color-pill" style="background-color:rgba(30,35,39,255)"></div><div class="chatlog__embed-content-container"><div class="chatlog__embed-content"><div class="chatlog__embed-text"><div class="chatlog__embed-title"><a class="chatlog__embed-title-link" href="https://github.com/ahrnbom/pyscript-litestar-demo"><div class="chatlog__markdown chatlog__markdown-preserve">GitHub - ahrnbom/pyscript-litestar-demo: Demonstration of how to us...</div></a></div><div class="chatlog__embed-description"><div class="chatlog__markdown chatlog__markdown-preserve">Demonstration of how to use Pyscript and Litestar together, to run web software with Python on both frontend and backend - ahrnbom/pyscript-litestar-demo</div></div></div><div class="chatlog__embed-thumbnail-container"><a class="chatlog__embed-thumbnail-link" href="https://images-ext-1.discordapp.net/external/68dv1fxgqD6JwBl-YRFLMbiT-y5KpHrRYBJoD4uYymc/https/opengraph.githubassets.com/63677196285727b41ceb55afada2550b41f720a9bd6be1162d7c64ab2bbeb653/ahrnbom/pyscript-litestar-demo"> <img alt="Thumbnail" class="chatlog__embed-thumbnail" loading="lazy" src="https://images-ext-1.discordapp.net/external/68dv1fxgqD6JwBl-YRFLMbiT-y5KpHrRYBJoD4uYymc/https/opengraph.githubassets.com/63677196285727b41ceb55afada2550b41f720a9bd6be1162d7c64ab2bbeb653/ahrnbom/pyscript-litestar-demo"/> </a></div></div></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1221807980107010171" id="chatlog__message-container-1221807980107010171"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/><div class="chatlog__reply-author" title="andrew_vr_d">AndrewD</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1221755135009624074')"> So, i was trying to use fetch(), but it didn't seem to work the way it was documented on pyscript.net.
I was just digging around on GitHub and realised the public docs are documenting a very recent change that is not in 2024.3.1.
Is there an intention that the docs are for the release, or is that more of a work in progress?
PS: pyscript is cool <img alt="😎" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f60e.svg" title="sunglasses"/> i built a skeleton of a client server website with fastAPI and pyscript in a few hours as my first experiment in web for a long time. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="25 March 2024 13:08"><a href="#chatlog__message-container-1221807980107010171">25/03/2024 13:08</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">the latest release will bring a <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pyscript.fetch</code> utility that should satisfy any possible user/requirement and still produce pythonic results ... for anything else, you can always opt in for raw <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">js.fetch</code> API which is described on MDN or as Web standard.</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222106294022832169" id="chatlog__message-container-1222106294022832169"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1221807980107010171')"> the latest release will bring a <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pyscript.fetch</code> utility that should satisfy any possible user/requirement and still produce pythonic results ... for anything else, you can always opt in for raw <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">js.fetch</code> API which is described on MDN or as Web standard. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="893438881331036191" title="andrew_vr_d">AndrewD</span> <span class="chatlog__timestamp" title="26 March 2024 08:54"><a href="#chatlog__message-container-1222106294022832169">26/03/2024 08:54</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Yes, the documentated interface looks great and does everything i need. I was just reporting that the live documentation seems to cover a change that isn't in the current release, but will be in the next release, from the symptoms I saw in my experiments.
It also looks like an mpy difference i noticed is already fixed. It's great to see how this has evolved so far from the tutorial i looked at that got me intrigued.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222107848440283148" id="chatlog__message-container-1222107848440283148"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/><div class="chatlog__reply-author" title="dagusiu">Dagusiu</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1221769950419488930')"> If you want a concrete example of using fetch with Pyscript, the way it was prior to that change, you can check out this repo: <a href="https://github.com/ahrnbom/pyscript-litestar-demo">https://github.com/ahrnbom/pyscript-litestar-demo</a>
It uses Litestar instead of FastAPI, but they're very similar </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="893438881331036191" title="andrew_vr_d">AndrewD</span> <span class="chatlog__timestamp" title="26 March 2024 09:00"><a href="#chatlog__message-container-1222107848440283148">26/03/2024 09:00</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Thanks, looks similar to what i came up with.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222110114861944863" id="chatlog__message-container-1222110114861944863"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="26 March 2024 09:09"><a href="#chatlog__message-container-1222110114861944863">26/03/2024 09:09</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="andrew_vr_d">@AndrewD</span> well caught. It looks like the docs for the next version of PyScript have been deployed as the current version. Sorry about that, and the confusion it caused. Next release (hopefully today) will bring things in sync.</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">2</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222257388862836868" id="chatlog__message-container-1222257388862836868"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/><div class="chatlog__reply-author" style="color:rgb(233,102,11)" title="ntoll">ntoll</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222110114861944863')"> <span class="chatlog__markdown-mention" title="andrew_vr_d">@AndrewD</span> well caught. It looks like the docs for the next version of PyScript have been deployed as the current version. Sorry about that, and the confusion it caused. Next release (hopefully today) will bring things in sync. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="893438881331036191" title="andrew_vr_d">AndrewD</span> <span class="chatlog__timestamp" title="26 March 2024 18:54"><a href="#chatlog__message-container-1222257388862836868">26/03/2024 18:54</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I was pleasantly surprised to determine the the docs were leading the project, instead of lagging <img alt="🙂" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f642.svg" title="slight_smile"/>
I'm also happy to report anything i find: it's as deep as my contribution can be at this stage</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222267305686204627" id="chatlog__message-container-1222267305686204627"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="26 March 2024 19:33"><a href="#chatlog__message-container-1222267305686204627">26/03/2024 19:33</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I noted this line in the documentation: <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">For more details about pydom.create please refer to its reference documentation.</code> on this page: <a href="https://pyscript.github.io/docs/2024.3.2/user-guide/dom/">https://pyscript.github.io/docs/2024.3.2/user-guide/dom/</a>
Which reference documentation is this referring to? Perhaps it would be a good idea to link it? I tried googling a bit but couldn't find anything</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222287891426971798" id="chatlog__message-container-1222287891426971798"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/><div class="chatlog__reply-author" title="andrew_vr_d">AndrewD</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222106294022832169')"> Yes, the documentated interface looks great and does everything i need. I was just reporting that the live documentation seems to cover a change that isn't in the current release, but will be in the next release, from the symptoms I saw in my experiments.
It also looks like an mpy difference i noticed is already fixed. It's great to see how this has evolved so far from the tutorial i looked at that got me intrigued. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="26 March 2024 20:55"><a href="#chatlog__message-container-1222287891426971798">26/03/2024 20:55</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">FYI with 2024.3.2 you should be good now</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222321745596256277" id="chatlog__message-container-1222321745596256277"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/><div class="chatlog__reply-author" title="dagusiu">Dagusiu</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222267305686204627')"> I noted this line in the documentation: <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">For more details about pydom.create please refer to its reference documentation.</code> on this page: <a href="https://pyscript.github.io/docs/2024.3.2/user-guide/dom/">https://pyscript.github.io/docs/2024.3.2/user-guide/dom/</a>
Which reference documentation is this referring to? Perhaps it would be a good idea to link it? I tried googling a bit but couldn't find anything </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="893438881331036191" title="andrew_vr_d">AndrewD</span> <span class="chatlog__timestamp" title="26 March 2024 23:10"><a href="#chatlog__message-container-1222321745596256277">26/03/2024 23:10</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">This is a current link <a href="https://pyscript.github.io/docs/2024.3.2/user-guide/builtins/#pyscriptfetch">https://pyscript.github.io/docs/2024.3.2/user-guide/builtins/#pyscriptfetch</a>, but when I was navigating the documentation over the weekend the version number didn't seem to be in the URL? Or somehow I navigated to the bleeding edge docs?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222321793893797968" id="chatlog__message-container-1222321793893797968"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222287891426971798')"> FYI with 2024.3.2 you should be good now </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="893438881331036191" title="andrew_vr_d">AndrewD</span> <span class="chatlog__timestamp" title="26 March 2024 23:10"><a href="#chatlog__message-container-1222321793893797968">26/03/2024 23:10</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">thanks</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222465968983380009" id="chatlog__message-container-1222465968983380009"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/9c4f537b39399ed8fcb3993f285e8f3e.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="365179867681128454" title="eruvanos">Eruvanos [UTC+1]</span> <span class="chatlog__timestamp" title="27 March 2024 08:43"><a href="#chatlog__message-container-1222465968983380009">27/03/2024 08:43</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Where can I find documentation about the JSProxy of micropython?
I found the hint, that they are close to pyodide, but when I try to use <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">as_object_map</code> or other methods, they are not present.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222479860576813156" id="chatlog__message-container-1222479860576813156"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222287891426971798')"> FYI with 2024.3.2 you should be good now </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="893438881331036191" title="andrew_vr_d">AndrewD</span> <span class="chatlog__timestamp" title="27 March 2024 09:38"><a href="#chatlog__message-container-1222479860576813156">27/03/2024 09:38</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">To round this out I just tried with 2024.3.2 and it now works as per the documentation version I first read - thanks for letting me know this was available.
I also tried MPY with the same example and it is now working (almost) the same as py - I just needed an mpy-click="..." attribute as @when doesn't seem to be supported with mpy.</span> <span class="chatlog__edited-timestamp" title="27 March 2024 09:39">(edited)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222479887718420580" id="chatlog__message-container-1222479887718420580"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/9c4f537b39399ed8fcb3993f285e8f3e.png"/><div class="chatlog__reply-author" title="eruvanos">Eruvanos [UTC+1]</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222465968983380009')"> Where can I find documentation about the JSProxy of micropython?
I found the hint, that they are close to pyodide, but when I try to use <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">as_object_map</code> or other methods, they are not present. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="27 March 2024 09:38"><a href="#chatlog__message-container-1222479887718420580">27/03/2024 09:38</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">the <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">jsffi</code> in MicroPython exposes only <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">to_js</code> and <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">create_proxy</code> but I am not sure it implements <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">dict_converter</code> in the <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">to_js</code> version, also because nobody ever asked for that to date in MicroPython ... do you want the dictionary to be a JS Map instead? ... and why is that, if I might ask? I can help with solutions but I'd like to understand more</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222480195613757520" id="chatlog__message-container-1222480195613757520"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/><div class="chatlog__reply-author" title="andrew_vr_d">AndrewD</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222479860576813156')"> To round this out I just tried with 2024.3.2 and it now works as per the documentation version I first read - thanks for letting me know this was available.
I also tried MPY with the same example and it is now working (almost) the same as py - I just needed an mpy-click="..." attribute as @when doesn't seem to be supported with mpy. </span> <span class="chatlog__reply-edited-timestamp" title="27 March 2024 09:39">(edited)</span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="27 March 2024 09:39"><a href="#chatlog__message-container-1222480195613757520">27/03/2024 09:39</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">good point about <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">@when</code> but I think it should work out of the box now with the unified <em>pyscript.ffi</em> ... will check why that would not be the case.</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1222480231307415592" id="chatlog__message-container-1222480231307415592"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="27 March 2024 09:39">09:39</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="jeffglass">@Jeff Glass</span> ^^^ ... any clue?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222480752843821099" id="chatlog__message-container-1222480752843821099"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222480195613757520')"> good point about <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">@when</code> but I think it should work out of the box now with the unified <em>pyscript.ffi</em> ... will check why that would not be the case. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="893438881331036191" title="andrew_vr_d">AndrewD</span> <span class="chatlog__timestamp" title="27 March 2024 09:42"><a href="#chatlog__message-container-1222480752843821099">27/03/2024 09:42</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">No error with specifying it, but the event handler did not run. I only noticed @when today when reviewing the updated docs - in my initial experiment I was using py_click or mpy_click</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222496975153266709" id="chatlog__message-container-1222496975153266709"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="27 March 2024 10:46"><a href="#chatlog__message-container-1222496975153266709">27/03/2024 10:46</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Hmm... <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">@when</code> should work with MicroPython.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222503187597099013" id="chatlog__message-container-1222503187597099013"><div class="chatlog__message"><div class="chatlog__message-aside"><svg class="chatlog__system-notification-icon"><use href="#thread-icon"></use></svg></div><div class="chatlog__message-primary"><span class="chatlog__system-notification-author" data-user-id="365179867681128454" title="eruvanos">Eruvanos [UTC+1]</span> <span> </span> <span class="chatlog__system-notification-content"> <span>started a thread.</span> </span> <span class="chatlog__system-notification-timestamp" title="27 March 2024 11:11"> <a href="#chatlog__message-container-1222503187597099013">27/03/2024 11:11</a> </span></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222505369738281051" id="chatlog__message-container-1222505369738281051"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="27 March 2024 11:19"><a href="#chatlog__message-container-1222505369738281051">27/03/2024 11:19</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="andrew_vr_d">@AndrewD</span> <img alt="👋" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44b.svg" title="wave"/> I just tried <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">@when</code> with MicroPython, and it works for me (see: <a href="https://pyscript.com/@ntoll/floral-bush/latest)">https://pyscript.com/@ntoll/floral-bush/latest)</a>. Can you supply more context please..? Thank you! <img alt="👍" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/></span></div></div></div></div><div class="chatlog__message-container" data-message-id="1222505445617438760" id="chatlog__message-container-1222505445617438760"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="27 March 2024 11:20">11:20</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">This is with the latest <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">2024.3.2</code> release.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222552459667312710" id="chatlog__message-container-1222552459667312710"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/><div class="chatlog__reply-author" style="color:rgb(233,102,11)" title="ntoll">ntoll</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222505369738281051')"> <span class="chatlog__markdown-mention" title="andrew_vr_d">@AndrewD</span> <img alt="👋" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44b.svg" title="wave"/> I just tried <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">@when</code> with MicroPython, and it works for me (see: <a href="https://pyscript.com/@ntoll/floral-bush/latest)">https://pyscript.com/@ntoll/floral-bush/latest)</a>. Can you supply more context please..? Thank you! <img alt="👍" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="27 March 2024 14:27"><a href="#chatlog__message-container-1222552459667312710">27/03/2024 14:27</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">my only possible concern is around the fact we use pyodide specific <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">add_event_listener</code> but no <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">proxy_create</code> in MicroPython when we add that listener within the fallback ... there might be some scenario that requires that but it's eventually an easy thing to fix, if needed.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222567502748319848" id="chatlog__message-container-1222567502748319848"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/96909edf73b13072aa23864d88545608.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1098917963081449555" title="chris.laffra">chris.laffra</span> <span class="chatlog__timestamp" title="27 March 2024 15:26"><a href="#chatlog__message-container-1222567502748319848">27/03/2024 15:26</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">The docs tell me that I can set a specific interpreter version in the TOML. I have done so for MicroPython. However, how do I know what versions I can choose from? Is there a list? Is this it: <a href="https://www.jsdelivr.com/package/npm/@micropython/micropython-webassembly-pyscript?tab=files?">https://www.jsdelivr.com/package/npm/@micropython/micropython-webassembly-pyscript?tab=files?</a></span></div><div class="chatlog__attachment"><a href="https://cdn.discordapp.com/attachments/1037014340802453615/1222567502861832192/image.png?ex=691be776&is=691a95f6&hm=6cffb2603e463ab720242c6b9e69c3159f02a39701309f3d1459b901d85d54b5&"> <img alt="Image attachment" class="chatlog__attachment-media" loading="lazy" src="assets/image.png" title="Image: image.png (57.36 KB)"/> </a></div><div class="chatlog__embed"><div class="chatlog__embed-color-pill" style="background-color:rgba(255,255,255,255)"></div><div class="chatlog__embed-content-container"><div class="chatlog__embed-content"><div class="chatlog__embed-text"><div class="chatlog__embed-title"><a class="chatlog__embed-title-link" href="https://www.jsdelivr.com/package/npm/@micropython/micropython-webassembly-pyscript?tab=files?"><div class="chatlog__markdown chatlog__markdown-preserve">@micropython/micropython-webassembly-pyscript CDN by jsDelivr - A C...</div></a></div><div class="chatlog__embed-description"><div class="chatlog__markdown chatlog__markdown-preserve">A free, fast, and reliable CDN for @micropython/micropython-webassembly-pyscript. MicroPython WebAssembly port, PyScript variant</div></div></div><div class="chatlog__embed-thumbnail-container"><a class="chatlog__embed-thumbnail-link" href="https://images-ext-1.discordapp.net/external/N2YLCVxkeSY2hSpGvcEZMZJ5eCVa0BC7z0bykPOxofc/https/www.jsdelivr.com/open-graph/image/npm/%40micropython/micropython-webassembly-pyscript"> <img alt="Thumbnail" class="chatlog__embed-thumbnail" loading="lazy" src="https://images-ext-1.discordapp.net/external/N2YLCVxkeSY2hSpGvcEZMZJ5eCVa0BC7z0bykPOxofc/https/www.jsdelivr.com/open-graph/image/npm/%40micropython/micropython-webassembly-pyscript"/> </a></div></div></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222570963716018266" id="chatlog__message-container-1222570963716018266"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/96909edf73b13072aa23864d88545608.png"/><div class="chatlog__reply-author" title="chris.laffra">chris.laffra</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222567502748319848')"> The docs tell me that I can set a specific interpreter version in the TOML. I have done so for MicroPython. However, how do I know what versions I can choose from? Is there a list? Is this it: <a href="https://www.jsdelivr.com/package/npm/@micropython/micropython-webassembly-pyscript?tab=files?">https://www.jsdelivr.com/package/npm/@micropython/micropython-webassembly-pyscript?tab=files?</a> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="27 March 2024 15:40"><a href="#chatlog__message-container-1222570963716018266">27/03/2024 15:40</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">you need a fully qualified URL that can grab the <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">.mjs</code> file from the CDN ... in <em>polyscript</em> we resolve that as such:
<code class="chatlog__markdown-pre chatlog__markdown-pre--multiline language-js"> module: (version = '1.22.0-272') =>
`https://cdn.jsdelivr.net/npm/@micropython/micropython-webassembly-pyscript@${version}/micropython.mjs`,</code>
pick any of those version numbers and create your own custom MicroPython URL (or build it locally and point at its dist files)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222574429796827157" id="chatlog__message-container-1222574429796827157"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="688046964549353491" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</span> <span class="chatlog__timestamp" title="27 March 2024 15:54"><a href="#chatlog__message-container-1222574429796827157">27/03/2024 15:54</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">If I'm thinking right <span class="chatlog__markdown-mention" title="agiammarchi">@Andrea Giammarchi</span> , and of the versions visible at the CDN link (under the files tab)<a href="https://www.jsdelivr.com/package/npm/@micropython/micropython-webassembly-pyscript?tab=files">https://www.jsdelivr.com/package/npm/@micropython/micropython-webassembly-pyscript?tab=files</a> should "work", since that's where things started getting published when Damien started working on that port.
Of course <span class="chatlog__markdown-mention" title="chris.laffra">@chris.laffra</span>, as you start using versions other than the pinned version in a specific PyScript release, compatibility as you go back in time isn't totally guaranteed, so test/explore at your own peril. But as Andrea says, that feature is useful for testing things against past MPy releases, or your own builds of MPy/CircuitPython/etc.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222575132900458646" id="chatlog__message-container-1222575132900458646"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/96909edf73b13072aa23864d88545608.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1098917963081449555" title="chris.laffra">chris.laffra</span> <span class="chatlog__timestamp" title="27 March 2024 15:57"><a href="#chatlog__message-container-1222575132900458646">27/03/2024 15:57</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="jeffglass">@Jeff Glass</span> Yeah, the goal is to pin things down and only upgrade to newer versions after doing testing.</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1222575217361031198" id="chatlog__message-container-1222575217361031198"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="27 March 2024 15:57">15:57</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">It would be good to add this info to the docs about "interpreter"</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222601797974233118" id="chatlog__message-container-1222601797974233118"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/96909edf73b13072aa23864d88545608.png"/><div class="chatlog__reply-author" title="chris.laffra">chris.laffra</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222575217361031198')"> It would be good to add this info to the docs about "interpreter" </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="27 March 2024 17:43"><a href="#chatlog__message-container-1222601797974233118">27/03/2024 17:43</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">we don't really encourage pinning underlying versions of interpreters, as we inevitably change things around those interpreters as they change (Pyodide) or "grow up" and mature (MicroPython). If the surrounding code expects <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">jsffi</code> recently landed in MicroPython, you might be disappointed by finding something else in previous versions. It's true that we do try/catches around Pyodide ability to date, as that's the most common interpreter so far, but we can't guarantee that'd be the case in the near future. To some extend, Pyodide is planning to improve its default <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">to_js</code> story, and once that lands we'll probably remove entirely the need for a <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">dict_converter</code> ... in there you won't be able to make it work with previous versions of Pyodide, so this feature is usually more about "<em>forward testing</em>" than regression tests, as we're strongly dependent on interpreters APIs provided in time. I hope this makes sense, if we start branching out every single Pyodide and MicroPython version to date to allow backward compatibility with previous interpreters, our <em>core</em> will be way more huge and our ability to pin down issues way more reduced, for both our projects and upstream. Does anything I've said make sense?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222618795508498442" id="chatlog__message-container-1222618795508498442"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/96909edf73b13072aa23864d88545608.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222601797974233118')"> we don't really encourage pinning underlying versions of interpreters, as we inevitably change things around those interpreters as they change (Pyodide) or "grow up" and mature (MicroPython). If the surrounding code expects <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">jsffi</code> recently landed in MicroPython, you might be disappointed by finding something else in previous versions. It's true that we do try/catches around Pyodide ability to date, as that's the most common interpreter so far, but we can't guarantee that'd be the case in the near future. To some extend, Pyodide is planning to improve its default <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">to_js</code> story, and once that lands we'll probably remove entirely the need for a <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">dict_converter</code> ... in there you won't be able to make it work with previous versions of Pyodide, so this feature is usually more about "<em>forward testing</em>" than regression tests, as we're strongly dependent on interpreters APIs provided in time. I hope this makes sense, if we start branching out every single Pyodide and MicroPython version to date to allow backward compatibility with previous interpreters, our <em>core</em> will be way more huge and our ability to pin down issues way more reduced, for both our projects and upstream. Does anything I've said make sense? </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1098917963081449555" title="chris.laffra">chris.laffra</span> <span class="chatlog__timestamp" title="27 March 2024 18:50"><a href="#chatlog__message-container-1222618795508498442">27/03/2024 18:50</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I understand, but I am faced with MicroPython errors that I cannot debug in certain versions....</span></div><div class="chatlog__attachment"><a href="https://cdn.discordapp.com/attachments/1037014340802453615/1222618795235999795/image.png?ex=691c173b&is=691ac5bb&hm=ff030d3fb7df160b6f8e3f26ce7e1aa24a2f0d15a55a0a503f1ddf633f84bd0a&"> <img alt="Image attachment" class="chatlog__attachment-media" loading="lazy" src="assets/image.png" title="Image: image.png (80.52 KB)"/> </a></div></div></div></div><div class="chatlog__message-container" data-message-id="1222618926563725373" id="chatlog__message-container-1222618926563725373"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="27 March 2024 18:51">18:51</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Absolutely no idea what API I call that is not implemented and worked before...</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222619814707597412" id="chatlog__message-container-1222619814707597412"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="27 March 2024 18:54"><a href="#chatlog__message-container-1222619814707597412">27/03/2024 18:54</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="chris.laffra">@chris.laffra</span> all feedback on improving error messages for debugging purposes most welcome. I have a call with Damien tomorrow (with Andrea) and we can raise this. <img alt="👍" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222620113203630182" id="chatlog__message-container-1222620113203630182"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/96909edf73b13072aa23864d88545608.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1098917963081449555" title="chris.laffra">chris.laffra</span> <span class="chatlog__timestamp" title="27 March 2024 18:55"><a href="#chatlog__message-container-1222620113203630182">27/03/2024 18:55</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I was on a VERY old build, so switched to the latest MicroPython and things work again.</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1222620317919350804" id="chatlog__message-container-1222620317919350804"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="27 March 2024 18:56">18:56</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I have reported the "has not implemented" issue before. What is the right way, open a ticket somewhere?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222621068821528606" id="chatlog__message-container-1222621068821528606"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="27 March 2024 18:59"><a href="#chatlog__message-container-1222621068821528606">27/03/2024 18:59</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Hmm... where did you report the issue..? I'd mention it over on the MicroPython github.</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1222621265123344495" id="chatlog__message-container-1222621265123344495"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="27 March 2024 19:00">19:00</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Also, MicroPython has a discord server with a webassembly channel. Damien is active in there... <a href="https://discord.gg/jmyM2f99pA">https://discord.gg/jmyM2f99pA</a></span></div><div class="chatlog__embed"><div class="chatlog__embed-invite-container"><div class="chatlog__embed-invite-title">Invite to join a server</div><div class="chatlog__embed-invite"><div class="chatlog__embed-invite-guild-icon-container"><img alt="Guild icon" class="chatlog__embed-invite-guild-icon" loading="lazy" src="assets/9cd0be7f8eb3f9be3cec847a621ee66c.png"/></div><div class="chatlog__embed-invite-info"><div class="chatlog__embed-invite-guild-name"><a href="https://discord.gg/jmyM2f99pA"> micropython </a></div><div class="chatlog__embed-invite-channel-name"><svg class="chatlog__embed-invite-channel-icon"><use href="#channel-icon"></use></svg> <span> webassembly</span></div></div></div></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222670578863964271" id="chatlog__message-container-1222670578863964271"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/96909edf73b13072aa23864d88545608.png"/><div class="chatlog__reply-author" title="chris.laffra">chris.laffra</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222620317919350804')"> I have reported the "has not implemented" issue before. What is the right way, open a ticket somewhere? </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="27 March 2024 22:16"><a href="#chatlog__message-container-1222670578863964271">27/03/2024 22:16</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">this is solved in latest, and it's known to be broken in <em>not latest</em> ... nothing you need to do, unless you encounter that with, or after, latest.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222695605755838554" id="chatlog__message-container-1222695605755838554"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="688046964549353491" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</span> <span class="chatlog__timestamp" title="27 March 2024 23:55"><a href="#chatlog__message-container-1222695605755838554">27/03/2024 23:55</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Ah yes, I would encourage you to pin PyScript versions, but not pin micropython separately in your applications. There is so much progress in both, essentially each PyScript release to a specific release of micropython (and Pyodide, but that API is a little older/more stable). PyScript makes zero guarantees about compatibility with previous or future MPy releases other than the one pinned in the release</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222697404906602567" id="chatlog__message-container-1222697404906602567"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="688046964549353491" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</span> <span class="chatlog__timestamp" title="28 March 2024 00:02"><a href="#chatlog__message-container-1222697404906602567">28/03/2024 00:02</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">(Chris I think you understand this all, I’m mostly spelling it out for posterity)</span> <span class="chatlog__edited-timestamp" title="28 March 2024 00:03">(edited)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222791163359264849" id="chatlog__message-container-1222791163359264849"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/><div class="chatlog__reply-author" style="color:rgb(233,102,11)" title="ntoll">ntoll</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222505369738281051')"> <span class="chatlog__markdown-mention" title="andrew_vr_d">@AndrewD</span> <img alt="👋" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44b.svg" title="wave"/> I just tried <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">@when</code> with MicroPython, and it works for me (see: <a href="https://pyscript.com/@ntoll/floral-bush/latest)">https://pyscript.com/@ntoll/floral-bush/latest)</a>. Can you supply more context please..? Thank you! <img alt="👍" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="893438881331036191" title="andrew_vr_d">AndrewD</span> <span class="chatlog__timestamp" title="28 March 2024 06:15"><a href="#chatlog__message-container-1222791163359264849">28/03/2024 06:15</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">The only two key differences I see are:
1) My button id has two '_' in the name:
<button id="unit_barcode_lookup">Lookup</button>
2) my script is async and the handler is aync as it uses fetch()
<script type="py" src="./main.py" async></script>
main.py:
@when("click", "#unit_barcode_lookup")
async def unit_barcode(event):
barcode = document.querySelector("#barcode").value
response = await fetch(f"/unit?barcode={barcode}")
The handler runs with <script type="py" ... /> but not <script type="mpy" ... />
In both py and mpy this works:
display(f"innerText={document.querySelector('#unit_barcode_lookup').innerText}")
This is displayed: innerText=Lookup</span> <span class="chatlog__edited-timestamp" title="28 March 2024 06:16">(edited)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222795152649621505" id="chatlog__message-container-1222795152649621505"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/><div class="chatlog__reply-author" title="andrew_vr_d">AndrewD</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222791163359264849')"> The only two key differences I see are:
1) My button id has two '_' in the name:
<button id="unit_barcode_lookup">Lookup</button>
2) my script is async and the handler is aync as it uses fetch()
<script type="py" src="./main.py" async></script>
main.py:
@when("click", "#unit_barcode_lookup")
async def unit_barcode(event):
barcode = document.querySelector("#barcode").value
response = await fetch(f"/unit?barcode={barcode}")
The handler runs with <script type="py" ... /> but not <script type="mpy" ... />
In both py and mpy this works:
display(f"innerText={document.querySelector('#unit_barcode_lookup').innerText}")
This is displayed: innerText=Lookup </span> <span class="chatlog__reply-edited-timestamp" title="28 March 2024 06:16">(edited)</span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="893438881331036191" title="andrew_vr_d">AndrewD</span> <span class="chatlog__timestamp" title="28 March 2024 06:31"><a href="#chatlog__message-container-1222795152649621505">28/03/2024 06:31</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="ntoll">@ntoll</span> I just created a pyscript account and cloned your test and replicated the behaviour:
1) add async => event handler does not run with mpy
See: <a href="https://pyscript.com/@andrew_vr_d/floral-bush-test/latest">https://pyscript.com/@andrew_vr_d/floral-bush-test/latest</a>
EDITED: I also noticed an slightly unexpected behaviour in pyscript.com: If you edit code and click "run", sometimes it doesn't seem to update or runs the old version? I'm not sure what happened, but when I first added async it <em>seemed</em> to work so I made more changes, but I got different results when I tried to reduce the test case. My first version of this message was incorrect because of this.
I've apparently got used to vscode autosaving when you debug, in an interface like pyscript.com "what you see is what you run" is probably a worthwhile behavior? That, or warn if you run with unsaved changes?</span> <span class="chatlog__edited-timestamp" title="28 March 2024 07:02">(edited)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222819477683703848" id="chatlog__message-container-1222819477683703848"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="28 March 2024 08:08"><a href="#chatlog__message-container-1222819477683703848">28/03/2024 08:08</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="andrew_vr_d">@AndrewD</span> thanks for the feedback. <span class="chatlog__markdown-mention" title="agiammarchi">@Andrea Giammarchi</span> this "doesn't work with async in MicroPython" is interesting. I wonder if we're not awaiting awaitables in MicroPython..? Ideas welcome..!</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222833799532904468" id="chatlog__message-container-1222833799532904468"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/><div class="chatlog__reply-author" style="color:rgb(233,102,11)" title="ntoll">ntoll</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222819477683703848')"> <span class="chatlog__markdown-mention" title="andrew_vr_d">@AndrewD</span> thanks for the feedback. <span class="chatlog__markdown-mention" title="agiammarchi">@Andrea Giammarchi</span> this "doesn't work with async in MicroPython" is interesting. I wonder if we're not awaiting awaitables in MicroPython..? Ideas welcome..! </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="28 March 2024 09:04"><a href="#chatlog__message-container-1222833799532904468">28/03/2024 09:04</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">the <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">async</code> attribute in the <code class="chatlog__markdown-pre chatlog__markdown-pre--inline"><script></code> is to enable top level await ... here there's no top level await anywhere in use, so I think it's not needed ... the rest is an upstream bug for MicroPython, as even enforcing <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">create_proxy(that_listener)</code> doesn't fix the the issue, even using manually <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">addEventListener</code> via DOM API. In short: this is not a <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">@when</code> decorator issue and not a PyScript issue or nothing we can solve, we need to inform Damien async listeners fail big time in mpy.</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1222834290384044053" id="chatlog__message-container-1222834290384044053"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="28 March 2024 09:06">09:06</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">for later meeting, this is my clone <a href="https://pyscript.com/@agiammarchi/floral-bush-test-copy/latest">https://pyscript.com/@agiammarchi/floral-bush-test-copy/latest</a> the <code class="chatlog__markdown-pre chatlog__markdown-pre--inline"><script async></code> is there, even if not needed, and everything works as expected <em>until</em> I define that function as <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">async</code>. With Pyodide there's not such issue.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222838939300134974" id="chatlog__message-container-1222838939300134974"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="28 March 2024 09:25"><a href="#chatlog__message-container-1222838939300134974">28/03/2024 09:25</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><img alt="👍" class="chatlog__emoji chatlog__emoji--large" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222877261221593199" id="chatlog__message-container-1222877261221593199"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="893438881331036191" title="andrew_vr_d">AndrewD</span> <span class="chatlog__timestamp" title="28 March 2024 11:57"><a href="#chatlog__message-container-1222877261221593199">28/03/2024 11:57</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Thanks for the info regarding the top level await, i am really just hacking around trying to see what works as I investigate pyscript. I hadn't used async io in python until it was required for trying pyscriot.fetch.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1222919372667097158" id="chatlog__message-container-1222919372667097158"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/><div class="chatlog__reply-author" title="andrew_vr_d">AndrewD</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222877261221593199')"> Thanks for the info regarding the top level await, i am really just hacking around trying to see what works as I investigate pyscript. I hadn't used async io in python until it was required for trying pyscriot.fetch. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="28 March 2024 14:44"><a href="#chatlog__message-container-1222919372667097158">28/03/2024 14:44</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">it's not strictly required, you can still <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch(url).text().then(lambda result: do_your_thing(result))</code></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1223146347599888444" id="chatlog__message-container-1223146347599888444"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222919372667097158')"> it's not strictly required, you can still <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch(url).text().then(lambda result: do_your_thing(result))</code> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="893438881331036191" title="andrew_vr_d">AndrewD</span> <span class="chatlog__timestamp" title="29 March 2024 05:46"><a href="#chatlog__message-container-1223146347599888444">29/03/2024 05:46</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">with pyscript.fetch()?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1223919534679916595" id="chatlog__message-container-1223919534679916595"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/4ad52ede2f8dcbbf64e54e0f0b99f79a.png"/><div class="chatlog__reply-author" title="dagusiu">Dagusiu</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1222267305686204627')"> I noted this line in the documentation: <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">For more details about pydom.create please refer to its reference documentation.</code> on this page: <a href="https://pyscript.github.io/docs/2024.3.2/user-guide/dom/">https://pyscript.github.io/docs/2024.3.2/user-guide/dom/</a>
Which reference documentation is this referring to? Perhaps it would be a good idea to link it? I tried googling a bit but couldn't find anything </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="522406679694802973" title="dagusiu">Dagusiu</span> <span class="chatlog__timestamp" title="31 March 2024 09:59"><a href="#chatlog__message-container-1223919534679916595">31/03/2024 09:59</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I would like to raise this again. Does anyone know which reference the documentation is referring to? If no such reference exists, I think the documentation should be changed to reflect this.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1224630182263128124" id="chatlog__message-container-1224630182263128124"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/><div class="chatlog__reply-author" title="andrew_vr_d">AndrewD</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1223146347599888444')"> with pyscript.fetch()? </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="02 April 2024 09:03"><a href="#chatlog__message-container-1224630182263128124">02/04/2024 09:03</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">yes, <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pyscript.fetch(...)</code> is exactly like <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch</code> in JS except you can also already forward the desired <em>response</em> outcome so that <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch(url).text()</code> or <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch(url).json()</code> already returns what you've asked for (but throw if the response was not ok).</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1224630419274858516" id="chatlog__message-container-1224630419274858516"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="02 April 2024 09:04">09:04</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">for any more convoluted use case, use <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">response = await fetch(url);text = await response.text();</code> so you have full control too</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1224674054728843345" id="chatlog__message-container-1224674054728843345"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1224630419274858516')"> for any more convoluted use case, use <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">response = await fetch(url);text = await response.text();</code> so you have full control too </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="893438881331036191" title="andrew_vr_d">AndrewD</span> <span class="chatlog__timestamp" title="02 April 2024 11:57"><a href="#chatlog__message-container-1224674054728843345">02/04/2024 11:57</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">My comment was related to .then() which seems more like JS? As least .then doesn't seem to be implemented hence my curiosity.
But the interface as documented is great and does everything I need for my usage. I like the ability to have fine grained control.
One detail: if the response is not ok (eg 404) the simple case didn't seem to throw with .json(), it just returned the error code as a detail field in json.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1224681043051937873" id="chatlog__message-container-1224681043051937873"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/><div class="chatlog__reply-author" title="andrew_vr_d">AndrewD</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1224674054728843345')"> My comment was related to .then() which seems more like JS? As least .then doesn't seem to be implemented hence my curiosity.
But the interface as documented is great and does everything I need for my usage. I like the ability to have fine grained control.
One detail: if the response is not ok (eg 404) the simple case didn't seem to throw with .json(), it just returned the error code as a detail field in json. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="02 April 2024 12:25"><a href="#chatlog__message-container-1224681043051937873">02/04/2024 12:25</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">any promise in JS has a <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">then</code> and proxied promises in Pyscript are compatible with that ... apologies for misleading you with that <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">then</code> it was to eventually give you the ability to detach the running code so you don't always or necessarily need to await to completition but I feel like going off-topic now <img alt="😅" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f605.svg" title="sweat_smile"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1224681331049631794" id="chatlog__message-container-1224681331049631794"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/><div class="chatlog__reply-author" title="andrew_vr_d">AndrewD</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1224674054728843345')"> My comment was related to .then() which seems more like JS? As least .then doesn't seem to be implemented hence my curiosity.
But the interface as documented is great and does everything I need for my usage. I like the ability to have fine grained control.
One detail: if the response is not ok (eg 404) the simple case didn't seem to throw with .json(), it just returned the error code as a detail field in json. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="02 April 2024 12:26"><a href="#chatlog__message-container-1224681331049631794">02/04/2024 12:26</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">if the error populate the content of the request with valid json you get that indeed ... use the fine-grained version and deal with anything you like <img alt="👍" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/></span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1225012766625234954" id="chatlog__message-container-1225012766625234954"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/42190653f009835ba9b2720c7ee0af59.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1224681043051937873')"> any promise in JS has a <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">then</code> and proxied promises in Pyscript are compatible with that ... apologies for misleading you with that <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">then</code> it was to eventually give you the ability to detach the running code so you don't always or necessarily need to await to completition but I feel like going off-topic now <img alt="😅" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f605.svg" title="sweat_smile"/> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="893438881331036191" title="andrew_vr_d">AndrewD</span> <span class="chatlog__timestamp" title="03 April 2024 10:23"><a href="#chatlog__message-container-1225012766625234954">03/04/2024 10:23</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I really appreciate the feedback.
I was just checking my interpretation was correct and hoping that this discussion helps with the docs.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1228875644994195518" id="chatlog__message-container-1228875644994195518"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/e521a84217fa705afeefda446fbcca4b.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="280043108782178305" title="shupik">shupik</span> <span class="chatlog__timestamp" title="14 April 2024 02:13"><a href="#chatlog__message-container-1228875644994195518">14/04/2024 02:13</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Hello! New to PyScript and just working through learning the configuration and all. My biggest question about the documentation is about <a href="https://pyscript.github.io/docs/latest/user-guide/configuration/#files">User Guide > Configuration > Options > Files</a>. This is very useful when I want to use a python module I wrote for a website that is in the development environment!
Only complaint is that I currently have to copy every file (<code class="chatlog__markdown-pre chatlog__markdown-pre--inline">__init__.py</code>, <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">foo.py</code>, <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">bar.py</code>, <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">baz.py</code>) to the virtual filesystem.
<code class="chatlog__markdown-pre chatlog__markdown-pre--multiline language-json">{
"files": {
"{DOMAIN}": "https://my-server.com",
"{PATH}": "a/path",
"{VERSION}": "1.2.3",
"{FROM}": "{DOMAIN}/{PATH}/{VERSION}",
"{TO}": "./my_module",
"{FROM}/__init__.py": "{TO}/__init__.py",
"{FROM}/foo.py": "{TO}/foo.py",
"{FROM}/bar.py": "{TO}/bar.py",
"{FROM}/baz.py": "{TO}/baz.py",
}
}</code>
Is there any way to do this without writing each file inside the folder? Maybe something like <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">"{FROM}/*": "{TO}/*"</code>?</span> <span class="chatlog__edited-timestamp" title="14 April 2024 02:13">(edited)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1228877882940461056" id="chatlog__message-container-1228877882940461056"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/e521a84217fa705afeefda446fbcca4b.png"/><div class="chatlog__reply-author" title="shupik">shupik</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1228875644994195518')"> Hello! New to PyScript and just working through learning the configuration and all. My biggest question about the documentation is about <a href="https://pyscript.github.io/docs/latest/user-guide/configuration/#files">User Guide > Configuration > Options > Files</a>. This is very useful when I want to use a python module I wrote for a website that is in the development environment!
Only complaint is that I currently have to copy every file (<code class="chatlog__markdown-pre chatlog__markdown-pre--inline">__init__.py</code>, <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">foo.py</code>, <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">bar.py</code>, <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">baz.py</code>) to the virtual filesystem.
<code class="chatlog__markdown-pre chatlog__markdown-pre--multiline language-json">{
"files": {
"{DOMAIN}": "https://my-server.com",
"{PATH}": "a/path",
"{VERSION}": "1.2.3",
"{FROM}": "{DOMAIN}/{PATH}/{VERSION}",
"{TO}": "./my_module",
"{FROM}/__init__.py": "{TO}/__init__.py",
"{FROM}/foo.py": "{TO}/foo.py",
"{FROM}/bar.py": "{TO}/bar.py",
"{FROM}/baz.py": "{TO}/baz.py",
}
}</code>
Is there any way to do this without writing each file inside the folder? Maybe something like <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">"{FROM}/*": "{TO}/*"</code>? </span> <span class="chatlog__reply-edited-timestamp" title="14 April 2024 02:13">(edited)</span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="688046964549353491" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</span> <span class="chatlog__timestamp" title="14 April 2024 02:21"><a href="#chatlog__message-container-1228877882940461056">14/04/2024 02:21</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">In general there’s not, since the browser doesn’t have a way to enumerate the folders on your local filesystem and fetch them.
If your local dev environment has configurability, PyScript will automatically unzip .zip and .tar.gz files - maybe a local tool that zips up all the files in your local directory ?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1228878818136031273" id="chatlog__message-container-1228878818136031273"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/e521a84217fa705afeefda446fbcca4b.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/6fbe0cd5c9ba5d7ecf5d111f7d291ac9.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="jeffglass">Jeff Glass</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1228877882940461056')"> In general there’s not, since the browser doesn’t have a way to enumerate the folders on your local filesystem and fetch them.
If your local dev environment has configurability, PyScript will automatically unzip .zip and .tar.gz files - maybe a local tool that zips up all the files in your local directory ? </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="280043108782178305" title="shupik">shupik</span> <span class="chatlog__timestamp" title="14 April 2024 02:25"><a href="#chatlog__message-container-1228878818136031273">14/04/2024 02:25</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I suspected the first bit, and lovely, thank you for such a quick answer! I can set that up in the build process. I might suggest adding something to the documentation part for the <a href="https://pyscript.github.io/docs/2024.3.2/user-guide/configuration/#packages">Packages</a> warning.
<div class="chatlog__markdown-quote"><div class="chatlog__markdown-quote-border"></div><div class="chatlog__markdown-quote-content">If you need Python modules for MicroPython, use the files option to manually copy the source code onto the file system.
</div></div>Maybe something that says copying over the source gar zip or tar gz</span> <span class="chatlog__edited-timestamp" title="14 April 2024 02:25">(edited)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1229337931152363654" id="chatlog__message-container-1229337931152363654"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/e521a84217fa705afeefda446fbcca4b.png"/><div class="chatlog__reply-author" title="shupik">shupik</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1228878818136031273')"> I suspected the first bit, and lovely, thank you for such a quick answer! I can set that up in the build process. I might suggest adding something to the documentation part for the <a href="https://pyscript.github.io/docs/2024.3.2/user-guide/configuration/#packages">Packages</a> warning.
<div class="chatlog__markdown-quote"><div class="chatlog__markdown-quote-border"></div><div class="chatlog__markdown-quote-content">If you need Python modules for MicroPython, use the files option to manually copy the source code onto the file system.
</div></div>Maybe something that says copying over the source gar zip or tar gz </span> <span class="chatlog__reply-edited-timestamp" title="14 April 2024 02:25">(edited)</span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="15 April 2024 08:50"><a href="#chatlog__message-container-1229337931152363654">15/04/2024 08:50</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">IIRC <span class="chatlog__markdown-mention" title="jeffglass">@Jeff Glass</span> also wrote how to publish your package form GitHub (or he surely did before) which might be another option so you host your files in there and the rest happens out of the box. This gives you semver or release tag guards too, otherwise the <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">.zip</code> solution should work in both Pyodide and MicroPython case.</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1229356370625826838" id="chatlog__message-container-1229356370625826838"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="15 April 2024 10:03"><a href="#chatlog__message-container-1229356370625826838">15/04/2024 10:03</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention">@here</span> next week (starting 22nd April) is "documentation week". Please feel free to add tickets to the repos here: <a href="https://github.com/pyscript/docs">https://github.com/pyscript/docs</a></span></div><div class="chatlog__embed"><div class="chatlog__embed-color-pill" style="background-color:rgba(30,35,39,255)"></div><div class="chatlog__embed-content-container"><div class="chatlog__embed-content"><div class="chatlog__embed-text"><div class="chatlog__embed-title"><a class="chatlog__embed-title-link" href="https://github.com/pyscript/docs"><div class="chatlog__markdown chatlog__markdown-preserve">GitHub - pyscript/docs</div></a></div><div class="chatlog__embed-description"><div class="chatlog__markdown chatlog__markdown-preserve">Contribute to pyscript/docs development by creating an account on GitHub.</div></div></div><div class="chatlog__embed-thumbnail-container"><a class="chatlog__embed-thumbnail-link" href="https://images-ext-1.discordapp.net/external/r5scb4pchyrspyk2Lu0TP6ppzL4SVotudm7zHHPhtGs/https/opengraph.githubassets.com/0083ed250012c838bec6829332f124be183eb3f179e4c72edfd1604e4bbfaa16/pyscript/docs"> <img alt="Thumbnail" class="chatlog__embed-thumbnail" loading="lazy" src="https://images-ext-1.discordapp.net/external/r5scb4pchyrspyk2Lu0TP6ppzL4SVotudm7zHHPhtGs/https/opengraph.githubassets.com/0083ed250012c838bec6829332f124be183eb3f179e4c72edfd1604e4bbfaa16/pyscript/docs"/> </a></div></div></div></div></div></div></div><div class="chatlog__message-container" data-message-id="1229356649970401320" id="chatlog__message-container-1229356649970401320"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="15 April 2024 10:04">10:04</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Let's help everyone access and learn PyScript with a whole bunch of documentation improvements. <img alt="👍" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/> We'd love your input and participation too..! <img alt="🤗" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f917.svg" title="hugging"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1237343354916704266" id="chatlog__message-container-1237343354916704266"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="07 May 2024 11:00"><a href="#chatlog__message-container-1237343354916704266">07/05/2024 11:00</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention">@here</span> a huge rewrite of the docs can be found here: <a href="https://docs.pyscript.net/2024.5.1/">https://docs.pyscript.net/2024.5.1/</a>
Some highlights:
<ul><li>Search! Search! Search!</li><li>Addressed lack of examples.</li><li>Complete <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pyscript.foo</code> builtins.</li><li>Rewrite, corrections and remove duplications.</li><li>It was the best of times, it was the worst of times... <img alt="😉" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f609.svg" title="wink"/></li></ul></span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="heart"><img alt="❤️" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/2764.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div><div class="chatlog__message-container" data-message-id="1237343379814350890" id="chatlog__message-container-1237343379814350890"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="07 May 2024 11:00">11:00</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Still so much more to do.</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1237343806022619167" id="chatlog__message-container-1237343806022619167"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="07 May 2024 11:02">11:02</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Also, we tracked down the domain / CNAME bug in our infra, so the URL will always be docs.pyscript.net/blah ... That's a couple of hours of my life I'll never get back. Thanks to Anaconda infra colleagues for helping out there. <img alt="😉" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f609.svg" title="wink"/></span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="🫡"><img alt="🫡" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1fae1.svg"/> <span class="chatlog__reaction-count">1</span></div><div class="chatlog__reaction" title="pray"><img alt="🙏" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f64f.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1256188976151134249" id="chatlog__message-container-1256188976151134249"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/b09defa1aa71ae48f072452efc0d615c.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="366259016835399680" title=".tth">tth</span> <span class="chatlog__timestamp" title="28 June 2024 11:06"><a href="#chatlog__message-container-1256188976151134249">28/06/2024 11:06</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Hi, new to PyScript, I really appreciate the <a href="https://docs.pyscript.net/2024.6.2/user-guide/builtins/">https://docs.pyscript.net/2024.6.2/user-guide/builtins/</a> page -- however I'm missing a page that lists all the modules (eg., js, pyscript, pyweb, pydom) that are injected into the the python module list. It would be nice with a reference list similar to the builtins page above.
I understand that all/most are documented in a mostly unstructured way today, but the only way to find this is by searching the docs which isn't ideal (for me, and I assume others as well).</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1257284228564123668" id="chatlog__message-container-1257284228564123668"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="01 July 2024 11:38"><a href="#chatlog__message-container-1257284228564123668">01/07/2024 11:38</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><img alt="👋" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44b.svg" title="wave"/> we're currently working on such a page, that will sit between the user-guide and FAQ in the left hand menu, entitled "Built-in APIs"</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="heart"><img alt="❤️" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/2764.svg"/> <span class="chatlog__reaction-count">2</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1258805361260105819" id="chatlog__message-container-1258805361260105819"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="05 July 2024 16:23"><a href="#chatlog__message-container-1258805361260105819">05/07/2024 16:23</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">OK... <span class="chatlog__markdown-mention" title=".tth">@tth</span> the new version of the docs as a "Built-in API" section at the top level that lists all the modules in the <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pyscript</code> namespace.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1258813603277176953" id="chatlog__message-container-1258813603277176953"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/b09defa1aa71ae48f072452efc0d615c.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="366259016835399680" title=".tth">tth</span> <span class="chatlog__timestamp" title="05 July 2024 16:55"><a href="#chatlog__message-container-1258813603277176953">05/07/2024 16:55</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I noticed, it's very much what I needed/wanted :-)</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1258814673579540574" id="chatlog__message-container-1258814673579540574"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="05 July 2024 17:00">17:00</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">One question, I'm not sure this is a documentation issue, may just be my lack of understanding of the underlying systems (pyodiode, polyscript, etc), but if PyScript is <em>only</em> injecting the name "pyscript" where does for instance "js" come from? I don't think that PyScript should repeat documentation that exist elsewhere, but a quick overview of the namespaces of all involved systems might be useful.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1259160679089442996" id="chatlog__message-container-1259160679089442996"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="06 July 2024 15:54"><a href="#chatlog__message-container-1259160679089442996">06/07/2024 15:54</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title=".tth">@tth</span> good point.
The <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">js</code> module is provided by each interpreter as a proxy for JavaScript's <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">globalThis</code> object. It's via this reference that we can start to build up the stuff in the <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pyscript</code> namespace. Also, PyScript is a LOT more than just the <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pyscript</code> namespace. There's configuration, web workers, and a whole bunch of boilerplate you never have to use to get the interpreters working. <img alt="😉" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f609.svg" title="wink"/> But at the same time, we also like to keep PyScript nice and small for simplicity, size and maintainability reasons.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1259194006160543755" id="chatlog__message-container-1259194006160543755"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/b09defa1aa71ae48f072452efc0d615c.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="366259016835399680" title=".tth">tth</span> <span class="chatlog__timestamp" title="06 July 2024 18:07"><a href="#chatlog__message-container-1259194006160543755">06/07/2024 18:07</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I'm still very new to PyScript, so I'm sure this lack of overview will bother me less and less as I learn more of the platform's architecture :-)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1259447801545228288" id="chatlog__message-container-1259447801545228288"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="07 July 2024 10:55"><a href="#chatlog__message-container-1259447801545228288">07/07/2024 10:55</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title=".tth">@tth</span> just keep asking questions... we're happy to help, and since we don't have beginner's eyes in relation to the project (like you do), your feedback about this stuff is invaluable for us. In that way we're able to improve the docs for folks who are new to PyScript. <img alt="👍" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1259457598759899202" id="chatlog__message-container-1259457598759899202"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/b09defa1aa71ae48f072452efc0d615c.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="366259016835399680" title=".tth">tth</span> <span class="chatlog__timestamp" title="07 July 2024 11:34"><a href="#chatlog__message-container-1259457598759899202">07/07/2024 11:34</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I'll keep that in mind -- but for now I think my biggest "problem" is that I just need to put in the work to become familiar with the system. My next learning exercise is to convert my existing javascript modules into 100% python. The code examples are a great help with that :-)</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1283750849276936236" id="chatlog__message-container-1283750849276936236"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="12 September 2024 12:27"><a href="#chatlog__message-container-1283750849276936236">12/09/2024 12:27</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><div class="chatlog__markdown-quote"><div class="chatlog__markdown-quote-border"></div><div class="chatlog__markdown-quote-content">My next learning exercise is to convert my existing javascript modules into 100% python
</div></div>
just FYI we are perfectly capable of importing JS modules into Python and use these either from the main thread or the worker ... you don't need to migrate everything to start playing with PyScript, you can start building with it and port only things you believe should be ported.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1288742307688087604" id="chatlog__message-container-1288742307688087604"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="26 September 2024 07:01"><a href="#chatlog__message-container-1288742307688087604">26/09/2024 07:01</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Trying to take an svg I have constructed in code and convert it to an image so I can draw it on a canvas.
Is to_js() going to help me with this ? or do I need to do all the steps. (svg to a string, tostring, string to a blob, createobjurl of the blob with img mimetype, drawImage to the canvas). Any help for this process ?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1288771563247767605" id="chatlog__message-container-1288771563247767605"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="289710160354607104" title="amphicoelias.">amphicoelias.</span> <span class="chatlog__timestamp" title="26 September 2024 08:58"><a href="#chatlog__message-container-1288771563247767605">26/09/2024 08:58</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">A bit of example code on the section on the DOM in the User guide is: "my_div.classes.append("a-css-class")". This seems like a mistake to me. (At least it throws an error for me, since the Classes object does not have an append method.) It seems to me it should be "my_div.classes.add("a-css-class")"</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1288779494089429022" id="chatlog__message-container-1288779494089429022"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="26 September 2024 09:29"><a href="#chatlog__message-container-1288779494089429022">26/09/2024 09:29</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="amphicoelias.">@amphicoelias.</span> oooh... good catch. Thank you..!</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1288779677560995863" id="chatlog__message-container-1288779677560995863"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="26 September 2024 09:30">09:30</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><a href="https://github.com/pyscript/docs/pull/140">https://github.com/pyscript/docs/pull/140</a></span></div><div class="chatlog__embed"><div class="chatlog__embed-color-pill" style="background-color:rgba(30,35,39,255)"></div><div class="chatlog__embed-content-container"><div class="chatlog__embed-content"><div class="chatlog__embed-text"><div class="chatlog__embed-title"><a class="chatlog__embed-title-link" href="https://github.com/pyscript/docs/pull/140"><div class="chatlog__markdown chatlog__markdown-preserve">Correct erroneous function call for adding a class. by ntoll · Pull...</div></a></div></div><div class="chatlog__embed-thumbnail-container"><a class="chatlog__embed-thumbnail-link" href="https://images-ext-1.discordapp.net/external/lwMnzew619VQv2IYlEa8rTdOtk5Jsg9HjkFPonDMWwk/https/opengraph.githubassets.com/919205cef7d278e9b1ba3ba274e1c22710bae0504890f11c3494dc3aae8e4bd8/pyscript/docs/pull/140"> <img alt="Thumbnail" class="chatlog__embed-thumbnail" loading="lazy" src="https://images-ext-1.discordapp.net/external/lwMnzew619VQv2IYlEa8rTdOtk5Jsg9HjkFPonDMWwk/https/opengraph.githubassets.com/919205cef7d278e9b1ba3ba274e1c22710bae0504890f11c3494dc3aae8e4bd8/pyscript/docs/pull/140"/> </a></div></div></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1288781572648210432" id="chatlog__message-container-1288781572648210432"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/><div class="chatlog__reply-author" style="color:rgb(233,102,11)" title="ntoll">ntoll</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1288779677560995863')"> <a href="https://github.com/pyscript/docs/pull/140">https://github.com/pyscript/docs/pull/140</a> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="289710160354607104" title="amphicoelias.">amphicoelias.</span> <span class="chatlog__timestamp" title="26 September 2024 09:37"><a href="#chatlog__message-container-1288781572648210432">26/09/2024 09:37</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">thanks!</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1288781654873083904" id="chatlog__message-container-1288781654873083904"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="26 September 2024 09:38"><a href="#chatlog__message-container-1288781654873083904">26/09/2024 09:38</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">You're welcome. Thank you for finding the <img alt="🐛" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f41b.svg" title="bug"/> <img alt="🙂" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f642.svg" title="slight_smile"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1288812353697091616" id="chatlog__message-container-1288812353697091616"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="26 September 2024 11:40"><a href="#chatlog__message-container-1288812353697091616">26/09/2024 11:40</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="ntoll">@ntoll</span> in the help here: <a href="https://docs.pyscript.net/2024.9.1/user-guide/workers/">https://docs.pyscript.net/2024.9.1/user-guide/workers/</a> there is a link to a worker demo on your pyscript.com page but it is missing... Trying to find it - does it have a new location ?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1288812581334679616" id="chatlog__message-container-1288812581334679616"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="26 September 2024 11:41"><a href="#chatlog__message-container-1288812581334679616">26/09/2024 11:41</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Where's the link? (And to what?)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1288812601463279707" id="chatlog__message-container-1288812601463279707"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="26 September 2024 11:41"><a href="#chatlog__message-container-1288812601463279707">26/09/2024 11:41</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">its close to "thread and the worker must be serializable"</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div><div class="chatlog__message-container" data-message-id="1288812690730520587" id="chatlog__message-container-1288812690730520587"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="26 September 2024 11:41">11:41</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">link points to: <a href="https://pyscript.com/@ntoll/tiny-silence/latest">https://pyscript.com/@ntoll/tiny-silence/latest</a></span></div></div></div></div><div class="chatlog__message-container" data-message-id="1288813929350303744" id="chatlog__message-container-1288813929350303744"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="26 September 2024 11:46">11:46</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I'm thinking maybe the worker has to also be in the toml file under [files] ?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1307290485445886032" id="chatlog__message-container-1307290485445886032"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/f34d622837cbf61965fd1bf5856c9dce.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="885050232260415518" title="pat_ben">patben</span> <span class="chatlog__timestamp" title="16 November 2024 10:25"><a href="#chatlog__message-container-1307290485445886032">16/11/2024 10:25</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Hi, is there some high-level documentation (for python beginners) to understand the following aspects of building an app with Pyscript + frameworks: 1) Persistent storage, 2) Login/authentication, 3) API, 4) Security, 5)Sharing?</span> <span class="chatlog__edited-timestamp" title="16 November 2024 10:26">(edited)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1308023483019694100" id="chatlog__message-container-1308023483019694100"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="18 November 2024 10:58"><a href="#chatlog__message-container-1308023483019694100">18/11/2024 10:58</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="pat_ben">@patben</span> well, there's <a href="https://docs.pyscript.net/2024.10.2/beginning-pyscript/">https://docs.pyscript.net/2024.10.2/beginning-pyscript/</a> which gets you started. A beginner's tutorial is definitely on my radar... but it's item 3627384992384754 on my to do list. <img alt="😉" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f609.svg" title="wink"/> Happy to discuss / collaborate.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1308039316223688714" id="chatlog__message-container-1308039316223688714"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/f34d622837cbf61965fd1bf5856c9dce.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="885050232260415518" title="pat_ben">patben</span> <span class="chatlog__timestamp" title="18 November 2024 12:01"><a href="#chatlog__message-container-1308039316223688714">18/11/2024 12:01</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="ntoll">@ntoll</span> thank-you. I also found some answers in chatGPT. I am interested in better understanding pyscript limitations compared to traditional server-side architecture. And also if there is optimal hybrid architecture combining client and server sides.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1308040137166295132" id="chatlog__message-container-1308040137166295132"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="18 November 2024 12:04"><a href="#chatlog__message-container-1308040137166295132">18/11/2024 12:04</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Yup, I hear ya. I have a similar interest too. Clearly "limitation" depends on context, and one person's limitation is another person's feature. PyScript is all about giving folks choices and, because we're still a relatively young project, discerning what idiomatic PyScript is. For example. <span class="chatlog__markdown-mention" title="chrislaffra.">@Chris Laffra</span> has settled on a pattern where MicroPython is used to drive the UI while Pyodide (i.e. CPython) is used for more expensive computation on a web worker. As always, this is a work in progress and we'd love folks to tell us what's on their minds. <img alt="👍" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/></span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1308060887189426207" id="chatlog__message-container-1308060887189426207"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/d371b9226619916355e6b88faf31b627.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/f34d622837cbf61965fd1bf5856c9dce.png"/><div class="chatlog__reply-author" title="pat_ben">patben</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1308039316223688714')"> <span class="chatlog__markdown-mention" title="ntoll">@ntoll</span> thank-you. I also found some answers in chatGPT. I am interested in better understanding pyscript limitations compared to traditional server-side architecture. And also if there is optimal hybrid architecture combining client and server sides. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1242599857655644164" title="chrislaffra.">Chris Laffra</span> <span class="chatlog__timestamp" title="18 November 2024 13:26"><a href="#chatlog__message-container-1308060887189426207">18/11/2024 13:26</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Interesting aspect of PyScript is that you can write a Python class once and then use it both on the server and in the browser. I have done this with PySheets and makes it a LOT easier and more reliable than having to marshall between Python on the server and JavaScript in the browser.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1308063813374836786" id="chatlog__message-container-1308063813374836786"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/d371b9226619916355e6b88faf31b627.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1242599857655644164" title="chrislaffra.">Chris Laffra</span> <span class="chatlog__timestamp" title="18 November 2024 13:38"><a href="#chatlog__message-container-1308063813374836786">18/11/2024 13:38</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="pat_ben">@patben</span> When it comes to developing UIs, the PyScript project is still trying to figure out how to do it, I guess. One school of thought is to use traditional HTML+CSS and then write hooks for events using <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">py-click</code> (see <a href="https://pyscript.com/@examples/pyscript-jokes/latest?files=README.md,index.html)">https://pyscript.com/@examples/pyscript-jokes/latest?files=README.md,index.html)</a>. The other school of thought is to have a Python API to create DOM elements programmatically, such as <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pyscript.web</code> (see <a href="https://docs.pyscript.net/2024.10.2/user-guide/dom/#pyscriptweb)">https://docs.pyscript.net/2024.10.2/user-guide/dom/#pyscriptweb)</a> or <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">LTK</code> as used by PySheets (see <a href="https://pyscript.github.io/ltk/)">https://pyscript.github.io/ltk/)</a>.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1308074912870694942" id="chatlog__message-container-1308074912870694942"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/f34d622837cbf61965fd1bf5856c9dce.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/d371b9226619916355e6b88faf31b627.png"/><div class="chatlog__reply-author" title="chrislaffra.">Chris Laffra</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1308060887189426207')"> Interesting aspect of PyScript is that you can write a Python class once and then use it both on the server and in the browser. I have done this with PySheets and makes it a LOT easier and more reliable than having to marshall between Python on the server and JavaScript in the browser. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="885050232260415518" title="pat_ben">patben</span> <span class="chatlog__timestamp" title="18 November 2024 14:22"><a href="#chatlog__message-container-1308074912870694942">18/11/2024 14:22</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Great concept indeed. I wasn't aware of that!</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1308076185095503925" id="chatlog__message-container-1308076185095503925"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/f34d622837cbf61965fd1bf5856c9dce.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/d371b9226619916355e6b88faf31b627.png"/><div class="chatlog__reply-author" title="chrislaffra.">Chris Laffra</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1308063813374836786')"> <span class="chatlog__markdown-mention" title="pat_ben">@patben</span> When it comes to developing UIs, the PyScript project is still trying to figure out how to do it, I guess. One school of thought is to use traditional HTML+CSS and then write hooks for events using <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">py-click</code> (see <a href="https://pyscript.com/@examples/pyscript-jokes/latest?files=README.md,index.html)">https://pyscript.com/@examples/pyscript-jokes/latest?files=README.md,index.html)</a>. The other school of thought is to have a Python API to create DOM elements programmatically, such as <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pyscript.web</code> (see <a href="https://docs.pyscript.net/2024.10.2/user-guide/dom/#pyscriptweb)">https://docs.pyscript.net/2024.10.2/user-guide/dom/#pyscriptweb)</a> or <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">LTK</code> as used by PySheets (see <a href="https://pyscript.github.io/ltk/)">https://pyscript.github.io/ltk/)</a>. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="885050232260415518" title="pat_ben">patben</span> <span class="chatlog__timestamp" title="18 November 2024 14:27"><a href="#chatlog__message-container-1308076185095503925">18/11/2024 14:27</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">ok and this is where it is difficult (for beginners) to make arbitrage. It would be nice to have more information about these options (blogs, tutorials, etc..). No pressure - but I do think it is valuable. Also I think the front-end part is also very interesting especially if it can stay fully pythonic. Congrats for LTK and Pysheets too.</span> <span class="chatlog__edited-timestamp" title="18 November 2024 14:28">(edited)</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1308114691750363228" id="chatlog__message-container-1308114691750363228"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="18 November 2024 17:00"><a href="#chatlog__message-container-1308114691750363228">18/11/2024 17:00</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="pat_ben">@patben</span> so we have a project called "Invent", that's currently in development (early days), targetting beginner coders who want to build Python driven UI based apps with PyScript.</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1308411369770717204" id="chatlog__message-container-1308411369770717204"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6bfba11493997c0826582ed6912a1089.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="546336524426280976" title="holdenweb">holdenweb</span> <span class="chatlog__timestamp" title="19 November 2024 12:39"><a href="#chatlog__message-container-1308411369770717204">19/11/2024 12:39</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">;'/</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1308411380684296254" id="chatlog__message-container-1308411380684296254"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="19 November 2024 12:39">12:39</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">]</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1308411852367200349" id="chatlog__message-container-1308411852367200349"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="19 November 2024 12:41">12:41</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">[Sorry abt the noise - I was carrying a cup of tea and my computer ...]</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1308433342118756423" id="chatlog__message-container-1308433342118756423"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="19 November 2024 14:06"><a href="#chatlog__message-container-1308433342118756423">19/11/2024 14:06</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">...almost a winky smiley. Nicely aimed. <img alt="🤣" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f923.svg" title="rofl"/> <img alt="🫖" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1fad6.svg" title="teapot"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1308464511900061746" id="chatlog__message-container-1308464511900061746"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="19 November 2024 16:10"><a href="#chatlog__message-container-1308464511900061746">19/11/2024 16:10</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I feel like that cup felt on the floor now</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1309093134453571604" id="chatlog__message-container-1309093134453571604"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/67d329960522ebd6356a2a5362358610.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="265788110829256704" title="personman.">personman</span> <span class="chatlog__timestamp" title="21 November 2024 09:48"><a href="#chatlog__message-container-1309093134453571604">21/11/2024 09:48</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">hi! are there any examples that use workers? the worker section of the docs seems to suggest that almost all pyscript apps should run in workers, saying things like "You should never block the main thread." in bold. But then it only links to one example, which is currently a 404: <a href="https://pyscript.com/@ntoll/tiny-silence/latest">https://pyscript.com/@ntoll/tiny-silence/latest</a></span></div></div></div></div><div class="chatlog__message-container" data-message-id="1309093232294105109" id="chatlog__message-container-1309093232294105109"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="21 November 2024 09:49">09:49</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">i clicked on a whole bunch of the examples on <a href="https://pyscript.com/@examples">https://pyscript.com/@examples</a>, and haven't found one that uses workers yet</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1309210979741208598" id="chatlog__message-container-1309210979741208598"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="21 November 2024 17:37"><a href="#chatlog__message-container-1309210979741208598">21/11/2024 17:37</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="personman.">@personman</span> ouch... that example should be live. I'll try fixing in tomorrow (right now = end of my day).</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1309211022443417650" id="chatlog__message-container-1309211022443417650"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/67d329960522ebd6356a2a5362358610.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="265788110829256704" title="personman.">personman</span> <span class="chatlog__timestamp" title="21 November 2024 17:37"><a href="#chatlog__message-container-1309211022443417650">21/11/2024 17:37</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">thanks!</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1310393029403873362" id="chatlog__message-container-1310393029403873362"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/67d329960522ebd6356a2a5362358610.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/><div class="chatlog__reply-author" style="color:rgb(233,102,11)" title="ntoll">ntoll</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1309210979741208598')"> <span class="chatlog__markdown-mention" title="personman.">@personman</span> ouch... that example should be live. I'll try fixing in tomorrow (right now = end of my day). </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="265788110829256704" title="personman.">personman</span> <span class="chatlog__timestamp" title="24 November 2024 23:54"><a href="#chatlog__message-container-1310393029403873362">24/11/2024 23:54</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">heya, just a gentle nudge in case this slipped your mind :)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1326561117253926912" id="chatlog__message-container-1326561117253926912"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/0.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="687265270229631006" title="jburnett9186">jburnett</span> <span class="chatlog__timestamp" title="08 January 2025 14:40"><a href="#chatlog__message-container-1326561117253926912">08/01/2025 14:40</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">The <a href="https://docs.pyscript.net/2024.11.1/examples/">Example applications</a> page in the docs lists <a href="https://pyscript.com/@examples/simple-clock/latest">A simple clock</a> as an example, but the link is 404</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1326607529811382453" id="chatlog__message-container-1326607529811382453"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/3b4c36928d3311a6cc5acb3482204e2d.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/0.png"/><div class="chatlog__reply-author" title="jburnett9186">jburnett</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1326561117253926912')"> The <a href="https://docs.pyscript.net/2024.11.1/examples/">Example applications</a> page in the docs lists <a href="https://pyscript.com/@examples/simple-clock/latest">A simple clock</a> as an example, but the link is 404 </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="793208472929173514" title="danyeaw">danyeaw</span> <span class="chatlog__timestamp" title="08 January 2025 17:44"><a href="#chatlog__message-container-1326607529811382453">08/01/2025 17:44</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Hi <span class="chatlog__markdown-mention" title="jburnett9186">@jburnett</span>, I noticed that as well when I was going through some of the examples. It looks <span class="chatlog__markdown-mention" title="neon22.">@Neon22</span> was doing some amazing work fixing up the examples in this PR: <a href="https://github.com/pyscript/docs/pull/137">https://github.com/pyscript/docs/pull/137</a></span></div><div class="chatlog__embed"><div class="chatlog__embed-color-pill" style="background-color:rgba(30,35,39,255)"></div><div class="chatlog__embed-content-container"><div class="chatlog__embed-content"><div class="chatlog__embed-text"><div class="chatlog__embed-title"><a class="chatlog__embed-title-link" href="https://github.com/pyscript/docs/pull/137"><div class="chatlog__markdown chatlog__markdown-preserve">Update examples.md by Neon22 · Pull Request #137 · pyscript/docs</div></a></div><div class="chatlog__embed-description"><div class="chatlog__markdown chatlog__markdown-preserve">included new examples. Made notes about what packages are loaded and added complexity sub headings.
Also note there are a number of errors in the examples.
Note:
Updated from 14 to 20 found at abo...</div></div></div><div class="chatlog__embed-thumbnail-container"><a class="chatlog__embed-thumbnail-link" href="https://images-ext-1.discordapp.net/external/qz3nTVnGeN9u3NBmU0JfWaaiPLfao2_kxUHBfD_P4yA/https/opengraph.githubassets.com/be86198656f917c84bc1704b73da21eb1ff76946ae3c6d2af14e4f74416988a2/pyscript/docs/pull/137"> <img alt="Thumbnail" class="chatlog__embed-thumbnail" loading="lazy" src="https://images-ext-1.discordapp.net/external/qz3nTVnGeN9u3NBmU0JfWaaiPLfao2_kxUHBfD_P4yA/https/opengraph.githubassets.com/be86198656f917c84bc1704b73da21eb1ff76946ae3c6d2af14e4f74416988a2/pyscript/docs/pull/137"/> </a></div></div></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1326637822135894068" id="chatlog__message-container-1326637822135894068"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/3b4c36928d3311a6cc5acb3482204e2d.png"/><div class="chatlog__reply-author" title="danyeaw">danyeaw</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1326607529811382453')"> Hi <span class="chatlog__markdown-mention" title="jburnett9186">@jburnett</span>, I noticed that as well when I was going through some of the examples. It looks <span class="chatlog__markdown-mention" title="neon22.">@Neon22</span> was doing some amazing work fixing up the examples in this PR: <a href="https://github.com/pyscript/docs/pull/137">https://github.com/pyscript/docs/pull/137</a> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="08 January 2025 19:45"><a href="#chatlog__message-container-1326637822135894068">08/01/2025 19:45</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">They tell me they're working on it. Waiting for the holidays to end - shouldn't be too much longer. Some already fixed but not yet published - so can see them in the github but not on the site.</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1337744379221381201" id="chatlog__message-container-1337744379221381201"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="08 February 2025 11:18"><a href="#chatlog__message-container-1337744379221381201">08/02/2025 11:18</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I still have some toml files with <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">[[fetch]]</code> in them but can't find it in the docs. Has it been replaced by <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">[files]</code> or can I just not find it</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1338587826333159424" id="chatlog__message-container-1338587826333159424"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/3b4c36928d3311a6cc5acb3482204e2d.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/><div class="chatlog__reply-author" title="neon22.">Neon22</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1337744379221381201')"> I still have some toml files with <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">[[fetch]]</code> in them but can't find it in the docs. Has it been replaced by <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">[files]</code> or can I just not find it </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="793208472929173514" title="danyeaw">danyeaw</span> <span class="chatlog__timestamp" title="10 February 2025 19:10"><a href="#chatlog__message-container-1338587826333159424">10/02/2025 19:10</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Ya, I don't see it in the docs either. It is being still tested for: <a href="https://github.com/pyscript/pyscript/blob/b13317d32f1881b8d7445b1f9e1d4bc8496c06c1/core/tests/manual/combo.html#L10">https://github.com/pyscript/pyscript/blob/b13317d32f1881b8d7445b1f9e1d4bc8496c06c1/core/tests/manual/combo.html#L10</a></span></div><div class="chatlog__embed"><div class="chatlog__embed-color-pill" style="background-color:rgba(30,35,39,255)"></div><div class="chatlog__embed-content-container"><div class="chatlog__embed-content"><div class="chatlog__embed-text"><div class="chatlog__embed-title"><a class="chatlog__embed-title-link" href="https://github.com/pyscript/pyscript/blob/b13317d32f1881b8d7445b1f9e1d4bc8496c06c1/core/tests/manual/combo.html"><div class="chatlog__markdown chatlog__markdown-preserve">pyscript/core/tests/manual/combo.html at b13317d32f1881b8d7445b1f9e...</div></a></div><div class="chatlog__embed-description"><div class="chatlog__markdown chatlog__markdown-preserve">PyScript is an open source platform for Python in the browser. Try PyScript: <a href="https://pyscript.com">https://pyscript.com</a> Examples: <a href="https://tinyurl.com/pyscript-examples">https://tinyurl.com/pyscript-examples</a> Community: <a href="https://discord.gg/HxvBtukrg2">https://discord.gg/HxvBtukrg2</a> - pyscri...</div></div></div><div class="chatlog__embed-thumbnail-container"><a class="chatlog__embed-thumbnail-link" href="https://images-ext-1.discordapp.net/external/yZHZVbWB-CXfagBXLG7e5EWw5J-dbLTULMc9reUNgWY/https/opengraph.githubassets.com/582b3567643d98c6946ffd1080434af0f014217eb345f338ae83f4607ac9dd16/pyscript/pyscript"> <img alt="Thumbnail" class="chatlog__embed-thumbnail" loading="lazy" src="https://images-ext-1.discordapp.net/external/yZHZVbWB-CXfagBXLG7e5EWw5J-dbLTULMc9reUNgWY/https/opengraph.githubassets.com/582b3567643d98c6946ffd1080434af0f014217eb345f338ae83f4607ac9dd16/pyscript/pyscript"/> </a></div></div></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1338603410097700985" id="chatlog__message-container-1338603410097700985"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/3b4c36928d3311a6cc5acb3482204e2d.png"/><div class="chatlog__reply-author" title="danyeaw">danyeaw</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1338587826333159424')"> Ya, I don't see it in the docs either. It is being still tested for: <a href="https://github.com/pyscript/pyscript/blob/b13317d32f1881b8d7445b1f9e1d4bc8496c06c1/core/tests/manual/combo.html#L10">https://github.com/pyscript/pyscript/blob/b13317d32f1881b8d7445b1f9e1d4bc8496c06c1/core/tests/manual/combo.html#L10</a> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="10 February 2025 20:12"><a href="#chatlog__message-container-1338603410097700985">10/02/2025 20:12</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="agiammarchi">@Andrea Giammarchi</span> <span class="chatlog__markdown-mention" title="ntoll">@ntoll</span> can we get an official position on this <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">[[fetch]]</code> please ?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1338798187963613217" id="chatlog__message-container-1338798187963613217"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/><div class="chatlog__reply-author" title="neon22.">Neon22</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1338603410097700985')"> <span class="chatlog__markdown-mention" title="agiammarchi">@Andrea Giammarchi</span> <span class="chatlog__markdown-mention" title="ntoll">@ntoll</span> can we get an official position on this <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">[[fetch]]</code> please ? </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="11 February 2025 09:06"><a href="#chatlog__message-container-1338798187963613217">11/02/2025 09:06</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I believe that's legacy logic we still wanted to support but indeed we suggest using <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">[files]</code> these days.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1338829946440646656" id="chatlog__message-container-1338829946440646656"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="11 February 2025 11:12"><a href="#chatlog__message-container-1338829946440646656">11/02/2025 11:12</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Thanks. I'll update my examples</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1338887399073251439" id="chatlog__message-container-1338887399073251439"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="11 February 2025 15:00"><a href="#chatlog__message-container-1338887399073251439">11/02/2025 15:00</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="neon22.">@Neon22</span> it's a legacy thing hiding in plain sight so we didn't break all the things. However, you should use <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">[files]</code> from now on, and perhaps we should remove support for <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">[[fetch]]</code>..? Thoughts in the community call perhaps..?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1338945088490962944" id="chatlog__message-container-1338945088490962944"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/3b4c36928d3311a6cc5acb3482204e2d.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="793208472929173514" title="danyeaw">danyeaw</span> <span class="chatlog__timestamp" title="11 February 2025 18:49"><a href="#chatlog__message-container-1338945088490962944">11/02/2025 18:49</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Does <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">[files]</code> only work if you are downloading from an external server?
For me, this works:
<code class="chatlog__markdown-pre chatlog__markdown-pre--multiline nohighlight">[[fetch]]
files = [ "card_detector.py", "card_matcher.py", "pokemon_cards.min.json" ]</code>
But this does not:
<code class="chatlog__markdown-pre chatlog__markdown-pre--multiline nohighlight">[files]
"/card_detector.py" = "./card_detector.py"
"/card_matcher.py" = "./card_matcher.py"
"/pokemon_cards.min.json" = "./pokemon_cards.min.json"</code></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1338946155454660608" id="chatlog__message-container-1338946155454660608"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="11 February 2025 18:53"><a href="#chatlog__message-container-1338946155454660608">11/02/2025 18:53</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Does it work if you lose the RHS of the equals ? I think you only need both sides if you're changing the name/path</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1338976849757212724" id="chatlog__message-container-1338976849757212724"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/3b4c36928d3311a6cc5acb3482204e2d.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="793208472929173514" title="danyeaw">danyeaw</span> <span class="chatlog__timestamp" title="11 February 2025 20:55"><a href="#chatlog__message-container-1338976849757212724">11/02/2025 20:55</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I tried that as well with <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">"/card_dectector.py" = ""</code>, same issue.</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1339168519324958772" id="chatlog__message-container-1339168519324958772"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="12 February 2025 09:37"><a href="#chatlog__message-container-1339168519324958772">12/02/2025 09:37</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Hmm... <span class="chatlog__markdown-mention" title="danyeaw">@danyeaw</span> this is interesting. TL;DR don't use <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">fetch</code> - that's the "old" way. Just use <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">files</code> instead. The definitive behaviour of <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">files</code> is here: <a href="https://docs.pyscript.net/2025.2.2/user-guide/configuration/#files">https://docs.pyscript.net/2025.2.2/user-guide/configuration/#files</a>
The examples you give that didn't work <em>should</em> work AFAICT. Can you paste any error messages you see..? Thank you!</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1339175203648966751" id="chatlog__message-container-1339175203648966751"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/3b4c36928d3311a6cc5acb3482204e2d.png"/><div class="chatlog__reply-author" title="danyeaw">danyeaw</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1338976849757212724')"> I tried that as well with <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">"/card_dectector.py" = ""</code>, same issue. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="12 February 2025 10:04"><a href="#chatlog__message-container-1339175203648966751">12/02/2025 10:04</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">This should work (I think)
<code class="chatlog__markdown-pre chatlog__markdown-pre--multiline nohighlight">[files]
"./card_detector.py" = ""</code></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1339179728439087156" id="chatlog__message-container-1339179728439087156"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="12 February 2025 10:22"><a href="#chatlog__message-container-1339179728439087156">12/02/2025 10:22</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="danyeaw">@danyeaw</span> I think the initial "./" is important or "" but not "/"</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1339244191988846663" id="chatlog__message-container-1339244191988846663"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="12 February 2025 14:38"><a href="#chatlog__message-container-1339244191988846663">12/02/2025 14:38</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="neon22.">@Neon22</span> of course... the left hand side is a URL (either a fully qualified one, or a relative one).</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1339247338560028755" id="chatlog__message-container-1339247338560028755"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/3b4c36928d3311a6cc5acb3482204e2d.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="793208472929173514" title="danyeaw">danyeaw</span> <span class="chatlog__timestamp" title="12 February 2025 14:50"><a href="#chatlog__message-container-1339247338560028755">12/02/2025 14:50</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Yup, that fixes it - great catch! I'll submit a PR to update the docs since the examples show <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">"/code.py" = "./subdir/code.py"</code> which is clearly wrong <img alt="😄" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f604.svg" title="smile"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1339263731514736641" id="chatlog__message-container-1339263731514736641"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="12 February 2025 15:55"><a href="#chatlog__message-container-1339263731514736641">12/02/2025 15:55</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Sorry... that'll be my fault. Glad you caught it. <img alt="👍" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg" title="thumbsup"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1339278683906510921" id="chatlog__message-container-1339278683906510921"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/><div class="chatlog__reply-author" title="neon22.">Neon22</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1339179728439087156')"> <span class="chatlog__markdown-mention" title="danyeaw">@danyeaw</span> I think the initial "./" is important or "" but not "/" </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="12 February 2025 16:55"><a href="#chatlog__message-container-1339278683906510921">12/02/2025 16:55</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">it's all about relative VS absolute URLs after all, that was a great hint <img alt="🙏" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f64f.svg" title="pray"/></span> <span class="chatlog__edited-timestamp" title="12 February 2025 16:55">(edited)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1339330794795307060" id="chatlog__message-container-1339330794795307060"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="12 February 2025 20:22"><a href="#chatlog__message-container-1339330794795307060">12/02/2025 20:22</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I checked the official examples and all ref to [[fetch]] has gone. but no examples yet using 'new' files mechanism of (say) loading a local image to show as a banner. I'm making some examples to submit.</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="heart"><img alt="❤️" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/2764.svg"/> <span class="chatlog__reaction-count">1</span></div><div class="chatlog__reaction" title="tada"><img alt="🎉" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f389.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1348946163830624363" id="chatlog__message-container-1348946163830624363"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/51103e9c0e44f4223813505341778805.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1133082003697307709" title="ridensium.">Ridensium</span> <span class="chatlog__timestamp" title="11 March 2025 09:10"><a href="#chatlog__message-container-1348946163830624363">11/03/2025 09:10</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">__ export __ = […] in module seems working only when made with <script> but not with PyWorker, if thats the case its good to be mentioned so in the documentation.</span> <span class="chatlog__edited-timestamp" title="11 March 2025 09:13">(edited)</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="thumbsup"><img alt="👍" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44d.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1348979502042316884" id="chatlog__message-container-1348979502042316884"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="11 March 2025 11:22"><a href="#chatlog__message-container-1348979502042316884">11/03/2025 11:22</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">This is perhaps a bug? Feel free to report it! <img alt="🙏" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f64f.svg" title="pray"/></span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="ok_hand"><img alt="👌" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44c.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1349059573633253417" id="chatlog__message-container-1349059573633253417"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/51103e9c0e44f4223813505341778805.png"/><div class="chatlog__reply-author" title="ridensium.">Ridensium</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1348946163830624363')"> __ export __ = […] in module seems working only when made with <script> but not with PyWorker, if thats the case its good to be mentioned so in the documentation. </span> <span class="chatlog__reply-edited-timestamp" title="11 March 2025 09:13">(edited)</span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="11 March 2025 16:41"><a href="#chatlog__message-container-1349059573633253417">11/03/2025 16:41</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">what do you mean? any live example we canb check?</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1349064499008901281" id="chatlog__message-container-1349064499008901281"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/51103e9c0e44f4223813505341778805.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1349059573633253417')"> what do you mean? any live example we canb check? </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1133082003697307709" title="ridensium.">Ridensium</span> <span class="chatlog__timestamp" title="11 March 2025 17:00"><a href="#chatlog__message-container-1349064499008901281">11/03/2025 17:00</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><a href="https://rdsm.pyscriptapps.com/worker-export/latest/">https://rdsm.pyscriptapps.com/worker-export/latest/</a></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1349067654115365074" id="chatlog__message-container-1349067654115365074"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/51103e9c0e44f4223813505341778805.png"/><div class="chatlog__reply-author" title="ridensium.">Ridensium</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1349064499008901281')"> <a href="https://rdsm.pyscriptapps.com/worker-export/latest/">https://rdsm.pyscriptapps.com/worker-export/latest/</a> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="11 March 2025 17:13"><a href="#chatlog__message-container-1349067654115365074">11/03/2025 17:13</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">well ... <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pyscript.workers</code> is an utility that orchestrates more, see <a href="https://docs.pyscript.net/2025.3.1/api/#pyscriptworkers">https://docs.pyscript.net/2025.3.1/api/#pyscriptworkers</a> ... <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">PyWorker</code> is a raw utility but we have tests for that and it's all about exposing features via <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">sync</code> namespace, it doesn't reflect <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pyscript.workers</code> intent and features.</span></div></div></div></div><div class="chatlog__message-container" data-message-id="1349067953177362464" id="chatlog__message-container-1349067953177362464"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="11 March 2025 17:14">17:14</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">we don't state anywhere this is also true for <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">PyWorker</code>:
<div class="chatlog__markdown-quote"><div class="chatlog__markdown-quote-border"></div><div class="chatlog__markdown-quote-content">The pyscript.workers reference allows Python code in the main thread to easily access named workers (and their exported functionality).</div></div></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1349068112976285727" id="chatlog__message-container-1349068112976285727"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/51103e9c0e44f4223813505341778805.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/><div class="chatlog__reply-author" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1349067654115365074')"> well ... <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pyscript.workers</code> is an utility that orchestrates more, see <a href="https://docs.pyscript.net/2025.3.1/api/#pyscriptworkers">https://docs.pyscript.net/2025.3.1/api/#pyscriptworkers</a> ... <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">PyWorker</code> is a raw utility but we have tests for that and it's all about exposing features via <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">sync</code> namespace, it doesn't reflect <code class="chatlog__markdown-pre chatlog__markdown-pre--inline">pyscript.workers</code> intent and features. </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1133082003697307709" title="ridensium.">Ridensium</span> <span class="chatlog__timestamp" title="11 March 2025 17:15"><a href="#chatlog__message-container-1349068112976285727">11/03/2025 17:15</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">thats why i mentioned it here as to have some hint in the documentation as it is not a bug</span> <span class="chatlog__edited-timestamp" title="11 March 2025 17:15">(edited)</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1349068470771388499" id="chatlog__message-container-1349068470771388499"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/6e3d708f4f9680a9c7bb76a916c623d8.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="1084780393548480513" style="color:rgb(26,194,181)" title="agiammarchi">Andrea Giammarchi</span> <span class="chatlog__timestamp" title="11 March 2025 17:16"><a href="#chatlog__message-container-1349068470771388499">11/03/2025 17:16</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I'd say this would be a feature request but if the docs don't state utilities are exported out of the box, I am not sure we should add that expectation or just keep things as these are right now. Any use case for not having a named worker instead? Runtime worker file might be one but I think you can always use a named worker to orchestrate whatever you like.</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="ok_hand"><img alt="👌" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f44c.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div><div class="chatlog__message-container" data-message-id="1349068664443244596" id="chatlog__message-container-1349068664443244596"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__short-timestamp" title="11 March 2025 17:17">17:17</div></div><div class="chatlog__message-primary"><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">anyway, off for today ... feel free to open either an issue or a discussion around this, thank you!</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1377227988407549982" id="chatlog__message-container-1377227988407549982"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/9c4f537b39399ed8fcb3993f285e8f3e.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="365179867681128454" title="eruvanos">Eruvanos [UTC+1]</span> <span class="chatlog__timestamp" title="28 May 2025 11:12"><a href="#chatlog__message-container-1377227988407549982">28/05/2025 11:12</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Hi, where could I find the docs about pydom?
The link in the docs seem to lead into the void:
<a href="https://docs.pyscript.net/2025.5.1/user-guide/dom/#pydom">https://docs.pyscript.net/2025.5.1/user-guide/dom/#pydom</a></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1377237270058369024" id="chatlog__message-container-1377237270058369024"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/9c4f537b39399ed8fcb3993f285e8f3e.png"/><div class="chatlog__reply-author" title="eruvanos">Eruvanos [UTC+1]</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1377227988407549982')"> Hi, where could I find the docs about pydom?
The link in the docs seem to lead into the void:
<a href="https://docs.pyscript.net/2025.5.1/user-guide/dom/#pydom">https://docs.pyscript.net/2025.5.1/user-guide/dom/#pydom</a> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="28 May 2025 11:49"><a href="#chatlog__message-container-1377237270058369024">28/05/2025 11:49</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I think you're looking for this <a href="https://docs.pyscript.net/2025.3.1/user-guide/dom/">https://docs.pyscript.net/2025.3.1/user-guide/dom/</a> its all under pyscript.web now. I believe docs are being updated. Consider using the ltk for anything more complex. <a href="https://pyscript.github.io/ltk/?tab=2&runtime=mpy">https://pyscript.github.io/ltk/?tab=2&runtime=mpy</a></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1423063668568100865" id="chatlog__message-container-1423063668568100865"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/9c4f537b39399ed8fcb3993f285e8f3e.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/><div class="chatlog__reply-author" title="neon22.">Neon22</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1377237270058369024')"> I think you're looking for this <a href="https://docs.pyscript.net/2025.3.1/user-guide/dom/">https://docs.pyscript.net/2025.3.1/user-guide/dom/</a> its all under pyscript.web now. I believe docs are being updated. Consider using the ltk for anything more complex. <a href="https://pyscript.github.io/ltk/?tab=2&runtime=mpy">https://pyscript.github.io/ltk/?tab=2&runtime=mpy</a> </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="365179867681128454" title="eruvanos">Eruvanos [UTC+1]</span> <span class="chatlog__timestamp" title="01 October 2025 22:46"><a href="#chatlog__message-container-1423063668568100865">01/10/2025 22:46</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Any idea if it is planned to update the docs?
I come back to the project from time to time, and give it another try. I know documentation is hard :/
Things I struggled with:
<ul><li><a href="https://docs.pyscript.net/2025.8.1/user-guide/dom/">https://docs.pyscript.net/2025.8.1/user-guide/dom/</a> links in bullet point 2 to a pydom module, but I can not find it, not sure if it still exists. (might be <a href="https://docs.pyscript.net/2025.8.1/api/#pyscriptweb">https://docs.pyscript.net/2025.8.1/api/#pyscriptweb</a> ?)</li><li><a href="https://docs.pyscript.net/2025.8.1/user-guide/first-steps/">https://docs.pyscript.net/2025.8.1/user-guide/first-steps/</a> shows the first steps, which is great to see how to execute basic code, but what if I want to structure my code in functions etc, would be nice to mention how I would </li></ul> create some function which fetches some data and shows it on the screen as soon as the page is ready. (that is often my first use case)
<ul><li>Maybe I oversaw it but a autogenerated api documentation based on the doc strings might be a good thing with lower maintenance.</li></ul>
Hope this message is not received in a bad matter, I wanted to provide some feedback regarding the docs. Despite that, the Python Arcade and Pyglet team still continues to bring Pyglet and Arcade into the browser. we already have some playgrounds here:
<a href="https://pyscript.com/@eruvanos/pyglet-web/latest?files=README.md">https://pyscript.com/@eruvanos/pyglet-web/latest?files=README.md</a>
<a href="https://pyscript.com/@eruvanos/arcade-web/latest?files=main.py">https://pyscript.com/@eruvanos/arcade-web/latest?files=main.py</a>
(Still some rendering issues, but the major work is already done)
Thanks for your great work</span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1423206434795163699" id="chatlog__message-container-1423206434795163699"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/9c4f537b39399ed8fcb3993f285e8f3e.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="365179867681128454" title="eruvanos">Eruvanos [UTC+1]</span> <span class="chatlog__timestamp" title="02 October 2025 08:14"><a href="#chatlog__message-container-1423206434795163699">02/10/2025 08:14</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">I opened a PR for the first point: <a href="https://github.com/pyscript/docs/pull/193">https://github.com/pyscript/docs/pull/193</a></span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="heart"><img alt="❤️" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/2764.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1423263428625174601" id="chatlog__message-container-1423263428625174601"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/5f426af01ce7829af9390e70182a8870.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><img alt="Avatar" class="chatlog__reply-avatar" loading="lazy" src="assets/9c4f537b39399ed8fcb3993f285e8f3e.png"/><div class="chatlog__reply-author" title="eruvanos">Eruvanos [UTC+1]</div><div class="chatlog__reply-content"><span class="chatlog__reply-link" onclick="scrollToMessage(event,'1423063668568100865')"> Any idea if it is planned to update the docs?
I come back to the project from time to time, and give it another try. I know documentation is hard :/
Things I struggled with:
<ul><li><a href="https://docs.pyscript.net/2025.8.1/user-guide/dom/">https://docs.pyscript.net/2025.8.1/user-guide/dom/</a> links in bullet point 2 to a pydom module, but I can not find it, not sure if it still exists. (might be <a href="https://docs.pyscript.net/2025.8.1/api/#pyscriptweb">https://docs.pyscript.net/2025.8.1/api/#pyscriptweb</a> ?)</li><li><a href="https://docs.pyscript.net/2025.8.1/user-guide/first-steps/">https://docs.pyscript.net/2025.8.1/user-guide/first-steps/</a> shows the first steps, which is great to see how to execute basic code, but what if I want to structure my code in functions etc, would be nice to mention how I would </li></ul> create some function which fetches some data and shows it on the screen as soon as the page is ready. (that is often my first use case)
<ul><li>Maybe I oversaw it but a autogenerated api documentation based on the doc strings might be a good thing with lower maintenance.</li></ul>
Hope this message is not received in a bad matter, I wanted to provide some feedback regarding the docs. Despite that, the Python Arcade and Pyglet team still continues to bring Pyglet and Arcade into the browser. we already have some playgrounds here:
<a href="https://pyscript.com/@eruvanos/pyglet-web/latest?files=README.md">https://pyscript.com/@eruvanos/pyglet-web/latest?files=README.md</a>
<a href="https://pyscript.com/@eruvanos/arcade-web/latest?files=main.py">https://pyscript.com/@eruvanos/arcade-web/latest?files=main.py</a>
(Still some rendering issues, but the major work is already done)
Thanks for your great work </span></div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="353381017140068352" title="neon22.">Neon22</span> <span class="chatlog__timestamp" title="02 October 2025 12:00"><a href="#chatlog__message-container-1423263428625174601">02/10/2025 12:00</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">wow - great job with pyglet. I'd seen they had a webgl backend but hadn't got around to trying it out. very nice - move over pygame <img alt="🙂" class="chatlog__emoji" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f642.svg" title="slight_smile"/></span></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1425073072213590016" id="chatlog__message-container-1425073072213590016"><div class="chatlog__message"><div class="chatlog__message-aside"><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/1f047e7d4848bad8f0a3362947e3eb03.png"/></div><div class="chatlog__message-primary"><div class="chatlog__header"><span class="chatlog__author" data-user-id="354682505271443468" style="color:rgb(233,102,11)" title="ntoll">ntoll</span> <span class="chatlog__timestamp" title="07 October 2025 11:51"><a href="#chatlog__message-container-1425073072213590016">07/10/2025 11:51</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve"><span class="chatlog__markdown-mention" title="eruvanos">@Eruvanos [UTC+1]</span> thanks for all the feedback! We're currently planning our next blocks of work and the docs are front-and-centre of this, so expect movement over the coming weeks.</span></div><div class="chatlog__reactions"><div class="chatlog__reaction" title="tada"><img alt="🎉" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f389.svg"/> <span class="chatlog__reaction-count">1</span></div><div class="chatlog__reaction" title="pray"><img alt="🙏" class="chatlog__emoji chatlog__emoji--small" loading="lazy" src="https://cdn.jsdelivr.net/gh/twitter/twemoji@latest/assets/svg/1f64f.svg"/> <span class="chatlog__reaction-count">1</span></div></div></div></div></div></div>
<div class="chatlog__message-group"><div class="chatlog__message-container" data-message-id="1432079279650508914" id="chatlog__message-container-1432079279650508914"><div class="chatlog__message"><div class="chatlog__message-aside"><div class="chatlog__reply-symbol"></div><img alt="Avatar" class="chatlog__avatar" loading="lazy" src="assets/f7f2e9361e8a54ce6e72580ac7b967af.png"/></div><div class="chatlog__message-primary"><div class="chatlog__reply"><div class="chatlog__reply-unknown">Original message was deleted or could not be loaded.</div></div><div class="chatlog__header"><span class="chatlog__author" data-user-id="1398428592098115617" title="maconic_93367">maconic</span> <span class="chatlog__timestamp" title="26 October 2025 18:51"><a href="#chatlog__message-container-1432079279650508914">26/10/2025 18:51</a></span></div><div class="chatlog__content chatlog__markdown"><span class="chatlog__markdown-preserve">Does spam like this actually work? I doubt you'll find any success here.</span></div></div></div></div></div>
</div>
<div class="postamble"><div class="postamble__entry">Exported 217 message(s)</div><div class="postamble__entry">Timezone: UTC+0</div></div>
</body></head></html>