Lib readline imported and can use now ctrl + D to stop Picowatch Terminal
This commit is contained in:
@@ -27,6 +27,7 @@ import sys
|
||||
import time
|
||||
import json
|
||||
import signal
|
||||
import readline
|
||||
import tempfile
|
||||
import binascii
|
||||
import textwrap
|
||||
@@ -608,7 +609,7 @@ class Picowatch(object):
|
||||
|
||||
def __init__(self, pyboard: Pyboard):
|
||||
self.filesystem = FileSystem(pyboard)
|
||||
signal.signal(signal.SIGINT, lambda a, b: self.interrupt())
|
||||
signal.signal(signal.SIGINT, lambda sig, frame: self.interrupt())
|
||||
|
||||
def boot(self):
|
||||
self.filesystem.pyboard.boot()
|
||||
@@ -905,7 +906,8 @@ while True:
|
||||
tab.line('boot', '.', '', 'Do a soft reset and run main.py (if exists) in REPL mode')
|
||||
tab.line('test', '!', '<file> (default: main.py)', 'Run a script from PC on the Pyboard and print out the results in raw-REPL mode')
|
||||
tab.line('run', '!!', '<file> (default: main.py)', 'Run a script on the Pyboard and print out the results in raw-REPL mode')
|
||||
tab.line('ctrl + c', 'exit', '', 'Exit Picowatch Terminal or interrupts the currently running code (in REPL or raw-REPL mode)')
|
||||
tab.line('ctrl + C', '', '', 'Interrupts the currently running code in REPL or raw-REPL mode')
|
||||
tab.line('ctrl + D', 'exit', '', 'Exit Picowatch Terminal')
|
||||
tab.line('uname', 'os', '', 'Pyboard name and version')
|
||||
tab.line('edit', 'vim', '<file> [use vim]', 'Edit specified file from the PC (vim or vscode is required)')
|
||||
tab.line('scan', 'ls', '<path> (default: /)', 'List information about the file(s) on the Pyboard')
|
||||
|
||||
Reference in New Issue
Block a user