UPYTHON.SCRIPT

UPYTHON.SCRIPT LOAD script
UPYTHON.SCRIPT EXISTS sha1 [sha1 ...]
UPYTHON.SCRIPT FLUSH [ASYNC | SYNC]

Manage the MicroPython script cache used by UPYTHON.EVAL and UPYTHON.EVALSHA. Behavior mirrors SCRIPT, on a cache that is independent of the PUC-Lua (SCRIPT), Luau (LUAU.SCRIPT), Wren (WREN.SCRIPT), and Tcl (TCL.SCRIPT) caches.

Example

> UPYTHON.SCRIPT LOAD "reply = sum(int(x) for x in ARGV)"
"b7c9d0..."

> UPYTHON.SCRIPT EXISTS b7c9d0...
1) (integer) 1

> UPYTHON.SCRIPT LOAD "def f("
(error) ERR Error compiling script: SyntaxError: invalid syntax

> UPYTHON.SCRIPT FLUSH
OK

See also