pycom / pycom-micropython-sigfox

A fork of MicroPython with the ESP32 port customized to run on Pycom's IoT multi-network modules.
MIT License
196 stars 167 forks source link

Can't find builtins.compile() function #90

Open gbeardall opened 6 years ago

gbeardall commented 6 years ago

Using LoPy:

(sysname='LoPy', nodename='LoPy', release='1.9.2.b2', version='v1.8.6-796-g489fa
fa0 on 2017-10-15', machine='LoPy with ESP32', lorawan='1.0.0')

If i do:

import builtins
help(builtins)

it doesn't report the builtins compile() function, whereas: https://docs.pycom.io/chapter/firmwareapi/micropython/builtin.html suggests that there is one.

Thanks

robert-hh commented 6 years ago

It looks like it does not exist. However, you can feed a source string directly into builtins.exec().

robert-hh commented 6 years ago

If you need it, you may make your custom firmware image and add the line #define MICROPY_PY_BUILTINS_COMPILE (1) to the file esp32/mpconfigport.h

gbeardall commented 6 years ago

Ok, thanks for the suggestions