I got lost in the forest:
Element().write
Hello, I have started quite a few attempts in combinations I can think of to use the new expression, but only get errors and now have no more ideas.
I just want to change the old expression
pyscript.write(“table”,table_print)
into the new “element().write”.
What does this look like then?
Sorry for the stupid question, but for someone of you just a snap, while I somehow have a knot in my brain.
Thanks
neil
2
Is this what you’re after?
Hi Neil, this was the “new format” I was looking for.
Element(“table”).write(table_print)
instead of the old one.
pyscript.write(“table”,table_print).
Maybe the hint (PyScript Deprecation Warning) should be a bit clearer.
pyodide.asm.js:10
PyScript Deprecation Warning: PyScript.write is
marked as deprecated and will be removed sometime soon. Please, use
Element(<id>).write instead.
Instead → element(id).write → element(“id”).write(variable)
Thanks for your help, now it works and I’m not standing in the forest anymore.
Greetings
Walter
1 Like
neil
4
Glad that you got it working
Yes, making warnings as clear as possible is always a good thing: one person’s “obvious” often isn’t the same as another’s!