Skip to content

'random' module incomplete ? #11578

Answered by robert-hh
gbroulet asked this question in ESP8266
May 21, 2023 · 3 comments · 11 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: 3 comments 11 replies

Comment options

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

@jimmo
Comment options

Answer selected by gbroulet
Comment options

You must be logged in to vote
8 replies
@scruss
Comment options

@rsharris
Comment options

@Josverl
Comment options

@rsharris
Comment options

@Josverl
Comment options

Comment options

You must be logged in to vote
1 reply
@rsharris
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
7 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy