-->
Page 1 of 2

nodemcu.py interactive console and lua loader

PostPosted: Sat Jun 20, 2015 1:41 pm
by md5crypt
after couple hours of working with LuaLoader I started screaming in rage an wrote my own application in python.
https://github.com/md5crypt/nodemcu.py

the python script can

send and read data to and from the device
paste command seq. from clipboard
paste any file (binary) to the device filesystem from clipboard
has a working command history and arrow keys
and it has shorter delays between sending lines then LuaLoader

Re: nodemcu.py interactive console and lua loader

PostPosted: Sat Jun 20, 2015 8:52 pm
by TerryE
You are about 3-4 in the Q to my knowledge. ;) Maybe yours might be best of breed.

Re: nodemcu.py interactive console and lua loader

PostPosted: Sun Jun 21, 2015 4:05 pm
by md5crypt
ok, the command list got a little bigger, now it supports cross-compiling lua.
Code: Select all:uart [boudrate]          - dynamic boudrate change
:load src                 - evaluate file content
:file dst src             - write local file src to dst
:paste [file]             - execute clipboard content
                            or write it to file if given
:cross-compile dst [file] - compile file or clipboard using
                            luac-cross and save to dst
:soft-compile dst [file]  - compile file or clipboard on device
                            and save do dst. This call can handle
                            lager files than file.compile
<other>                   - send line to device

you can include ":" commands in pasted and loaded data. This way you can write a single script to fully program the device.

Re: nodemcu.py interactive console and lua loader

PostPosted: Sun Jun 21, 2015 4:35 pm
by TerryE
running node.compile on the ESP8266 or using the -s option to strip the debug drops the code footprint by ~40%