Add webrepl_client.py remote shell using MicroPython WebREPL protocol
webrepl_client.py is pep8online.com checked without errors/warnings. It runs under python v2 as well as v3. Very convenient for running Micropython remote shell on a mobile device with small display where browser just is too big. I use webrepl_client.py on 40x30 console (320x240 display) of Raspberry Pi ZeroW to run Micropython on ESP-01s module attached to flying drone, for servo bomb drop mechanism for now.
I did a major rewrite of webrepl_client.py, now all modes (raw/normal/paste) work and only minimal difference for raw mode remains wrt screen terminal session. Documentation now fully describes webrepl_client.py features and demontrates with sample session: https://github.com/Hermann-SW/webrepl#webrepl-shell
If pull request gets accepted, then it should be on last commit and not on the commit requested initially.
I tried to use your PR, but I'm getting this error (running with py3):
Traceback (most recent call last):
File "./webrepl_client.py", line 207, in <module>
websocket.enableTrace(False)
AttributeError: module 'websocket' has no attribute 'enableTrace'
~~I had to use pip3 install websocket first, which gave me gevent-1.3.7 greenlet-0.4.15 websocket-0.2.1. Anything wrong with the dependencies?~~
Installing websocket-client seems to make it work. Thanks! 👍
for the error "module 'websocket' has no attribute 'enableTrace'" you must install websocket-client:
pip install websocket-client
@Hermann-SW I found this pull request very usefull, thanks.
Closed in favour of the feature being added to webrepl_cli.py, as done in 1e09d9a1d90fe52aba11d1e659afbc95a50cf088