Search found 230 matches

by cefn
Thu Mar 28, 2019 5:36 pm
Forum: MicroPython pyboard
Topic: Why does my REPL session always have this output
Replies: 7
Views: 5412

Re: Why does my REPL session always have this output

See https://github.com/adafruit/circuitpython/issues/611 for a bit more detail and workarounds, at least for Debian-based and Ubuntu-based Linuxes.
by cefn
Thu Mar 28, 2019 4:18 pm
Forum: Programs, Libraries and Tools
Topic: Launching a separate process instead of calling a memory intensive function
Replies: 11
Views: 6649

Re: Launching a separate process instead of calling a memory intensive function

Working on similar issues, I found myself drawn to pfalcon's utemplate library https://github.com/pfalcon/utemplate which turns templates into generators consuming information from a dictionary. Assuming your logic is fixed, you can 'precompile' the generators and store them as python. That way you ...
by cefn
Sun Mar 24, 2019 5:29 pm
Forum: ESP8266 boards
Topic: ESP8266_write to external file_Micropython
Replies: 5
Views: 3760

Re: ESP8266_write to external file_Micropython

Have you considered just using a socket server you've built yourself to get the data out of the ESP8266. Once you've sent the data to a CPython environment you should be able to transfer it to any database or service you want. There's bound to be a Cpython library to suit. I've recently been explori...
by cefn
Sat Mar 23, 2019 10:15 pm
Forum: ESP8266 boards
Topic: File system issue
Replies: 2
Views: 2228

Re: File system issue

I previously encountered this kind of behaviour when running with a very noisy USB power supply. Do you trust the power supply you are using? Can you try the same setup with a higher-quality (typically expensive,branded) USB power source? In the past I've used Apple USB chargers or laptop USB ports ...
by cefn
Sat Mar 23, 2019 10:09 pm
Forum: General Discussion and Questions
Topic: Scripting using Rshell?
Replies: 1
Views: 2044

Re: Scripting using Rshell?

I have previously used rshell's CLI behaviours directly, like this... https://github.com/vgkits/vanguard/blob/25bb089b05df8c1666f22f23b8829459852fdd05/utilities/command.py#L166 This technique involves manipulating sys.argv to 'pretend' to rshell that it has been invoked with particular command line ...
by cefn
Fri Mar 22, 2019 8:54 pm
Forum: General Discussion and Questions
Topic: compile .py to .mpy on the board
Replies: 2
Views: 3020

Re: compile .py to .mpy on the board

See these issues for dynamically bytecode-compiling .mpy files on the filesystem ready to be loaded into RAM... https://github.com/micropython/micropython/issues/2709 https://github.com/micropython/micropython/issues/4187 ...and these issues for loading dynamically generated .mpy structures into exe...
by cefn
Fri Mar 22, 2019 10:46 am
Forum: ESP8266 boards
Topic: ESP8266_write to external file_Micropython
Replies: 5
Views: 3760

Re: ESP8266_write to external file_Micropython

You can put the data into a file on the ESP8266 and then copy the file to the PC. I commonly use Adafruit's AMPY tool for this but RShell has support for file copying too AMPY https://learn.adafruit.com/micropython-basics-load-files-and-run-code/install-ampy RSHELL https://github.com/dhylands/rshell...
by cefn
Fri Mar 22, 2019 10:41 am
Forum: ESP8266 boards
Topic: ESP8266 + RESTful API (GET/POST)
Replies: 3
Views: 11972

Re: ESP8266 + RESTful API (GET/POST)

The simple HTTP server at https://docs.micropython.org/en/latest/ ... k_tcp.html can be modified to inspect the 'method' value passed in a HTTP header, and call different functions depending on what method is found.
by cefn
Thu Mar 21, 2019 6:19 pm
Forum: General Discussion and Questions
Topic: RuntimeError from PEP479 violation - need help
Replies: 4
Views: 3406

Re: RuntimeError from PEP479 violation - need help

@pythoncoder that was the route I took eventually, though it would be great for these exceptions to be traceable some other way within micropython. By coincidence I'd maintained the compatibility with CPython since I was first prototyping it, so was able to follow your guidance. Perhaps obviously, t...
by cefn
Thu Mar 21, 2019 5:40 pm
Forum: General Discussion and Questions
Topic: Working on enhancing the webrepl html client
Replies: 1
Views: 1782

Re: Working on enhancing the webrepl html client

Thanks for your work on this. The WebREPL is a fantastic starting point, but certainly needs some love from a maintainer and you've already made some visible improvements from this screenshot. I'm assuming https://github.com/micropython/webrepl/compare/master...joelhoro:master shows your changes. To...