Skip to content

'random' module incomplete ? #11578

Answered by robert-hh
gbroulet asked this question in ESP8266
May 21, 2023 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

As you tell, the esp8266 random module does implement only a small subset of the random module to save flash space for devices with small memory. Building your own firmware, you can change that by setting:

#define MICROPY_PY_URANDOM_EXTRA_FUNCS (1)

In the mpconfigport.h of the ESP8266 port, or better in the mpconfigboard.h of the GENERIC board section. Generally, the configuration could be changed to support more features with the 2MB version of the firmware. Only someone has to make the change, test it and make a PR for it.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@gbroulet
Comment options

@jimmo
Comment options

Answer selected by gbroulet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants