diff --git a/src/picowatch.py b/src/picowatch.py index 89d8c1c..61a4747 100644 --- a/src/picowatch.py +++ b/src/picowatch.py @@ -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', '!', ' (default: main.py)', 'Run a script from PC on the Pyboard and print out the results in raw-REPL mode') tab.line('run', '!!', ' (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', ' [use vim]', 'Edit specified file from the PC (vim or vscode is required)') tab.line('scan', 'ls', ' (default: /)', 'List information about the file(s) on the Pyboard')