Client to handle micropython web_repl interactively
Project description
iwebrepl
Python module to handle micropython websocket (WS) repl protocol interactively. It is modified original implementation to make it more user friendly.
Requirements
It should work with python3 with simple pip commands:
pip install iwebrepl
iwebrepl
Few webreplcmd examples:
iwebrepl --host 192.168.4.1 --password ulx3s
Note that you can also specify basic parameters using environment variables:
export IWEBREPL_HOST=127.0.0.1
export IWEBREPL_PASSWORD=ulx3s
export IWEBREPL_PORT=8266
and then you can just specify command:
iwebrepl
All options are listed using --help:
iwebrepl --help
Manual
usage: iwebrepl [-h] [--host HOST] [--time TIME] [--port PORT] [--verbose]
[--debug] [--redirect] [--password PASSWORD] [--cmd CMD]
[--after AFTER] [--before BEFORE]
iwebrepl - connect to websocket webrepl
optional arguments:
-h, --help show this help message and exit
--host HOST, -i HOST Host to connect to
--time TIME, -t TIME Delay time to receive response
--port PORT, -P PORT Port to connect to
--verbose, -v Verbose information
--debug, -d Enable debugging messages
--redirect, -r Redirect
--password PASSWORD, -p PASSWORD
Use following password to connect
--cmd CMD, -c CMD command to execute
--after AFTER, -A AFTER
command to execute after interactive mode
--before BEFORE, -B BEFORE
command to execute before interactive mode
iwebrepl --host 192.168.4.1 --password ulx3s
iwebrepl --host 192.168.4.1 --password ulx3s --cmd 'import os; os.listdir()'
Keyboard:
Keyboard: Ctrl-x to exit, Ctrl-d softreboot, Ctrl-k display help
Keyboard shortcuts
You can use following keyboard shortcuts:
Custom keybindings:
- CTRL-x : to exit WebREPL Terminal
- CTRL-e : Enters paste mode
- CTRL-d: In normal mode does a soft reset (and exit), in paste mode : executes pasted script
- CTRL-c : Keyboard interrupt in normal mode, in paste mode : cancel
- CTRL-r: Backsapce x 20 (to erase current line in chunks) or flush line buffer
- CTRL-u: import shortcut command (writes import)
- CTRL-f: to list files in cwd (ls shorcut command)
- CTRL-n: shows mem info
- CTRL-y: gc.collect() shortcut command
- CTRL-space: repeats last command
- CTRL-t: runs test_code.py if present
- CTRL-w: flush test_code from sys modules, so it can be run again
- CTRL-a: force synchronized mode (better if using wrepl through ssh session)
- CTRL-p: toggle autosuggest mode (Fish shell like) (if not in synchronized mode)
- CTRL-k: prints the custom keybindings (this list)
Complete Requirements
It should work with python3 with simple pip commands:
sudo apt-get update
sudo apt-get install -y python3 python3-pip
sudo pip3 install iwebrepl
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
iwebrepl-0.2.0.tar.gz
(6.4 kB
view details)
File details
Details for the file iwebrepl-0.2.0.tar.gz
.
File metadata
- Download URL: iwebrepl-0.2.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.5.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7e7c58698743401c389a0a5a5c5a6f42786c5c46d4dfea204f288281228f395 |
|
MD5 | a4075074c4cabc0ea39787953f39a037 |
|
BLAKE2b-256 | 8cb9d7e61249f3208f80ecb17827c7e4c0dfc0e10f1daf304b10e1852ee55356 |