



assets folder on some of the examples - like Altair. How can we create our own (besides cloning a project that has that structure already in place)? (edited)








item = ltk.Input(value).attr("type","number").attr("id", myid).on("change input", ltk.proxy(lambda event: self.fix_field(event))).on("mouseenter", ltk.proxy(lambda event: self.highlight_svg(event, True))).on("mouseout", ltk.proxy(lambda event: self.highlight_svg(event, False)))
Would prefer:
item = ltk.Input(value).attr("type","number").attr("id", myid)
.on("change input", ltk.proxy(lambda event: self.fix_field(event)))
.on("mouseenter", ltk.proxy(lambda event: self.highlight_svg(event, True)))
.on("mouseout", ltk.proxy(lambda event: self.highlight_svg(event, False)))
svg_div = ltk.create(f"""
<svg id="svg-01" height="{height}" width="{width}">
<ellipse id="ellipse" cx="44" cy="44" rx="33" ry="50" style="fill:yellow;stroke:purple;stroke-width:2" />
</svg>
""").attr("id","isosvg")

















https://sadukie.pyscriptapps.com/codemash-countdown/latest/main.py

./ would call a function to open the file in the editor instead of acting as a normal link../ or /











filename=\"envmap.jpg\"\r\nContent-Type: image/png...
i hope this helps with the issue (edited)











main.py and use the src="./main.py" like PSDC does, then you'll see Python code, not just code-block content.
import { html } from '@codemirror/lang-html';
import { pythonLanguage } from '@codemirror/lang-python';
export default () =>
html({
nestedLanguages: [
{
tag: 'script',
attrs: (attrs) => attrs.type === 'py' || attrs.type === 'mpy',
parser: pythonLanguage.parser,
},
],
});

import { html } from '@codemirror/lang-html';
import { pythonLanguage } from '@codemirror/lang-python';
export default () =>
html({
nestedLanguages: [
{
tag: 'script',
attrs: (attrs) => attrs.type === 'py' || attrs.type === 'mpy',
parser: pythonLanguage.parser,
},
],
}); 

import { html } from '@codemirror/lang-html';
import { pythonLanguage } from '@codemirror/lang-python';
export default () =>
html({
nestedLanguages: [
{
tag: 'script',
attrs: (attrs) => attrs.type === 'py' || attrs.type === 'mpy',
parser: pythonLanguage.parser,
},
],
}); 


<script type="py"> or <script type="mpy">.

<script type="py"> or <script type="mpy">. 


import or offer something else you would need to await then when needed but we can't bootstrap or install out of the box everything available in Pyodide.

import or offer something else you would need to await then when needed but we can't bootstrap or install out of the box everything available in Pyodide. 
















credentialless ... I hope they'll fix that sooner than later 








{MY_SECRET} so for example if you created a secret called MY_SECRET with a value of "Bearer 123", you can then create an api proxy and the header you can use:
Authorization{MY_SECRET}

{MY_SECRET} so for example if you created a secret called MY_SECRET with a value of "Bearer 123", you can then create an api proxy and the header you can use:
Authorization{MY_SECRET}


Dashboard as title and /dashboard as route/url:


Dashboard as title and /dashboard as route/url: 










pyscript.com is blocked message if I just click on it. but if I ctrl-click then the link opens. What am I doing wrong here ?
<a class="ltk-a button" href="https://pyscript.com/@neon22/weavemaker-file-converter" target="_blank">Iso Weaves Explorer</a>
Fails if https://pyscript.com/ or https://neon22.pyscriptapps.com with same blocked message.

# drawing is an svg element node
imgpart = drawing.outerHTML.encode('utf-8')
srcpart = "data:image/svg+xml;base64,".encode('utf-8')
source = str(srcpart + imgpart)
image = ltk.window.Image.new()
image.src = source
self.canvas.context.drawImage(image, 0, 0)
However the src is appearing expanded in the dubgger with maybe cors problems.
How can I fix it ?
What I have in src:
data:image/svg+xml;base64,<svg width="40" viewbox="0 0 40 40" preserveaspectratio="xMidYMid meet" height="40" xmlns="http://www.w3.org/2000/svg"><g id="BG"><rect height="45" y="18" x="22" style="stroke: #000;stroke-width:%200px;fill:%20rgb(0%20255%200)%22%20width=%2245%22%3E%3C/rect%3E%3C/g%3E%3C/svg%3E
what the debugger tells me it sees:
https://neon22.pyscriptapps.com/mpy-master-template/latest/b'data:image/svg+xml;base64,%3Csvg%20width=%2240%22%20viewbox=%220%200%2040%2040%22%20preserveaspectratio=%22xMidYMid%20meet%22%20height=%2240%22%20xmlns=%22http://www.w3.org/2000/svg%22%3E%3Cg%20id=%22BG%22%3E%3Crect%20height=%2245%22%20y=%2252%22%20x=%2249%22%20style=%22stroke:%20#000;stroke-width:%200px;fill:%20rgb(0%20255%200)%22%20width=%2245%22%3E%3C/rect%3E%3C/g%3E%3C/svg%3E'
so its added my pyscript.com url on the front - and fails. Could be I have bigger problems than this but not sure yet.
Any hints ?




ctrl-S in Chrome initiates a save so you don't have to use ctrl-sh-S specially. Might bemore useful to bind ctrl-r to run....


















export=true to generate the zip file, but it seems we haven't pushed the download feature yet - apologies when we spoke we had just merged that feature to dev
export=true to the config file? it seems to me like pyscript.toml is about runtime behavior, and exporting is an editor/project manager behavior.











https://pyscript.com/@ambv/genuary-template-copy/latest, there is no project called genuary-template-copy.

























































Uncaught (in promise) Error: showDirectoryPicker is not supported
at Object.Mr [as getFileSystemDirectoryHandle] (fs.js:25:13)
at call1 (micropython.mjs:1:70346)
at micropython.wasm:0x36585
at micropython.wasm:0x11a28
at micropython.wasm:0x11ab2
at invoke_iiii (micropython.mjs:1:74596)
at micropython.wasm:0x28adf
at micropython.wasm:0x18254
at micropython.wasm:0x12805
at invoke_iiiii (micropython.mjs:1:74764)
Looking at the logs I don't see any infra issues around the time of your message unless I got the times wrong







Uncaught (in promise) Error: showDirectoryPicker is not supported
at Object.Mr [as getFileSystemDirectoryHandle] (fs.js:25:13)
at call1 (micropython.mjs:1:70346)
at micropython.wasm:0x36585
at micropython.wasm:0x11a28
at micropython.wasm:0x11ab2
at invoke_iiii (micropython.mjs:1:74596)
at micropython.wasm:0x28adf
at micropython.wasm:0x18254
at micropython.wasm:0x12805
at invoke_iiiii (micropython.mjs:1:74764)
Looking at the logs I don't see any infra issues around the time of your message unless I got the times wrong 
fs.mount Issue and error is here: https://github.com/pyscript/pyscript/issues/2338#issuecomment-2876405125












addEventListener('py:ready', () => loading.close()); instead of mpy and the ran it. (also was using 2025.7.1) Am now using 7.2. I don't know what went wrong or how it is broken. I will delete page soon.






ltk.Markdown existed - which alas it does not. Perhaps it is overeager to help.





port = await window.navigator.serial.requestPort()
await port.open(to_js(serial_options))
where
serial_options = {
'baudRate': 115200, # Adjust as needed for your device
'dataBits': 8, # Common values: 7 or 8
'parity': 'none', # Common values: 'none', 'even', 'odd'
'stopBits': 1, # Common values: 1 or 2
'flowControl': 'none' # Can be 'none', 'hardware', 'software'
} absolutely did not need the to_js to convert the python dict into its JS equivalent. After remonstrating with it I got this response:
"Thank you for the clarification and feedback regarding the usage of the to_js function with the Web Serial API. You're absolutely correct; since the Web Serial API is primarily a JavaScript interface, to_js is necessary to convert the Python dictionary into a format that the JavaScript API can understand."
However it appears it does not learn locally past this conversation.















Twice to turn it off again.
Please fix it so it only opens the panes that were open when the inspector was opened.
Pretty please 








