Possible utility apps
This commit is contained in:
parent
7480c1f4eb
commit
486d433a0b
6 changed files with 1327 additions and 0 deletions
BIN
builtin_apps/PyDOS/PyDOS.bmp
Normal file
BIN
builtin_apps/PyDOS/PyDOS.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
1273
builtin_apps/PyDOS/code.py
Normal file
1273
builtin_apps/PyDOS/code.py
Normal file
File diff suppressed because it is too large
Load diff
4
builtin_apps/PyDOS/metadata.json
Normal file
4
builtin_apps/PyDOS/metadata.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"title": "PyDOS",
|
||||
"icon": "PyDOS.bmp"
|
||||
}
|
||||
46
builtin_apps/virtrepl/code.py
Normal file
46
builtin_apps/virtrepl/code.py
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
import os
|
||||
from supervisor import reload
|
||||
try:
|
||||
from codeop import compile_command
|
||||
except:
|
||||
pass
|
||||
|
||||
print("REPL in (Circuit-)Python (type exit to close)")
|
||||
|
||||
__cmd = ""
|
||||
while True:
|
||||
if 'compile_command' in dir():
|
||||
# 9.0.0 alpha 7 or later supports multiple line statements
|
||||
__line = input(",,, " if __cmd else "=>> " )
|
||||
|
||||
if __cmd:
|
||||
__cmd += ("\n" + (" " if __line != "" else "") + __line)
|
||||
else:
|
||||
if __line.lower() == 'exit':
|
||||
break
|
||||
__cmd = __line
|
||||
try:
|
||||
if compile_command(__cmd):
|
||||
exec(compile_command(__cmd))
|
||||
__cmd = ""
|
||||
except Exception as __err:
|
||||
print("*ERROR* Exception:",str(__err))
|
||||
__cmd = ""
|
||||
else:
|
||||
# Pre 9.0.0 alpha 7 code or Micropython (single line statments only)
|
||||
__line = input("=>> ")
|
||||
if __line.lower() == 'exit':
|
||||
break
|
||||
__result = None
|
||||
try:
|
||||
exec('__result='+__line)
|
||||
except:
|
||||
try:
|
||||
exec(__line)
|
||||
except Exception as err:
|
||||
print("*ERROR* Exception:",str(err))
|
||||
|
||||
if __result != None and __line.find('=') == -1:
|
||||
print(__result)
|
||||
|
||||
reload()
|
||||
4
builtin_apps/virtrepl/metadata.json
Normal file
4
builtin_apps/virtrepl/metadata.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"title": "Virtual REPL",
|
||||
"icon": "virtrepl.bmp"
|
||||
}
|
||||
BIN
builtin_apps/virtrepl/virtrepl.bmp
Normal file
BIN
builtin_apps/virtrepl/virtrepl.bmp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Loading…
Reference in a new issue