mirror of
https://github.com/pyscript/pyscript.git
synced 2026-04-05 05:00:30 -04:00
Fix #1998 - Allow lazy terminal bootstrap + MicroPython terminal
* Fix #1998 - Allow lazy PyTerminal bootstrap * Fix #1998 - Allow lazy terminal bootstrap / runtime * Implemented mpy terminal in both main and worker * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1447cb3094
commit
4e4ac56729
@@ -13,7 +13,7 @@
|
||||
def greetings(event):
|
||||
print('hello world')
|
||||
</script>
|
||||
<py-script worker terminal>
|
||||
<script type="mpy" worker terminal>
|
||||
# works on both worker and main scripts
|
||||
print("__terminal__", __terminal__)
|
||||
|
||||
@@ -25,8 +25,12 @@
|
||||
|
||||
# this works as expected
|
||||
print("this goes to stderr", file=sys.stderr)
|
||||
document.addEventListener('click', lambda event: print(event.type));
|
||||
</py-script>
|
||||
document.addEventListener('click', lambda event: print(event.type))
|
||||
|
||||
# this works on MicroPython too
|
||||
import code
|
||||
code.interact()
|
||||
</script>
|
||||
<button id="my-button" py-click="greetings">Click me</button>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user