Search found 463 matches

by SpotlightKid
Wed May 20, 2020 1:59 pm
Forum: micro:bit boards
Topic: Incorporating MyLib.py into the flashed hex file
Replies: 2
Views: 3258

Re: Incorporating MyLib.py into the flashed hex file

I guess you have to partition you library into smaller modules and let the students import / incorporate only the parts really needed for the current task. Probably makes for a better (more structured) library design too.
by SpotlightKid
Wed May 20, 2020 1:57 pm
Forum: General Discussion and Questions
Topic: machine.Pin.pull_down ?
Replies: 5
Views: 4908

Re: machine.Pin.pull_down ?

Sorry, I don't understand a word of what you have written. Could you try to rephrase it?
by SpotlightKid
Wed May 20, 2020 1:51 am
Forum: Programs, Libraries and Tools
Topic: CSV module devleopment
Replies: 14
Views: 7231

Re: CSV module devleopment

cr0mbly wrote:
Fri Mar 27, 2020 8:04 pm
I've just added a example test written in the micro-python unittest implementation, is there a reason why the other modules don't utilise this?
Because the unittest module itself started out pretty flaky and it took some time before it became useful.
by SpotlightKid
Tue May 19, 2020 12:19 pm
Forum: General Discussion and Questions
Topic: searchig for a file in sd
Replies: 4
Views: 3086

Re: searchig for a file in sd

Using os.ilistdir() only to convert the return value to a list isn't very effective and can lead to memory errors when searching directories with many entries. Here's my version of a find function, which acts as an iterator, i.e. yields matching files (with full path) one by one. It recurses by defa...
by SpotlightKid
Sun May 17, 2020 8:10 pm
Forum: ESP8266 boards
Topic: Problem with Newline if i sending textfiles with udp-socket
Replies: 5
Views: 3435

Re: Problem with Newline if i sending textfiles with udp-socket

Also, make sure that you open the file to write the data to in binary mode:

Code: Select all

with open("myfile.bin", "wb") as fobj:
    fobj.write(data)
by SpotlightKid
Fri May 15, 2020 9:26 pm
Forum: General Discussion and Questions
Topic: wlan switching to wrong dns address
Replies: 8
Views: 3836

Re: wlan getting wrong dns address from dhcp

I would check the logs of your DHCP server (or your hardware router).
by SpotlightKid
Fri May 15, 2020 9:21 pm
Forum: General Discussion and Questions
Topic: interrupt flag / main code?
Replies: 1
Views: 2036

Re: interrupt flag / main code?

uxhamby wrote:
Fri May 15, 2020 8:57 pm
What's the upythonic way to accomplish this?
Either the same or by using micropython.schedule() or not using timers/interrupts but uasyncio.
by SpotlightKid
Fri May 15, 2020 9:19 pm
Forum: General Discussion and Questions
Topic: Unix (or MacOS or Windows) Port Installation
Replies: 6
Views: 3717

Re: Unix (or MacOS or Windows) Port Installation

Some Linux distributions have packages for MicroPython, which install the Unix port. For MacOS you could look at homebrew, maybe they have a package for it? Providing pre-compiled binaries on the MicroPython website for different Linux distributions and MacOS versions and keeping them up-to-date is ...
by SpotlightKid
Tue May 12, 2020 8:43 pm
Forum: ESP32 boards
Topic: esp32 umqtt ssl problem (ca_cert)
Replies: 2
Views: 1924

Re: esp32 umqtt ssl problem (ca_cert)

Unfortunately, the documentation exhibits, uhm, some mismatch with reality:

https://github.com/micropython/micropython/issues/3646
https://github.com/micropython/micropyt ... tls.c#L367