https://learn.adafruit.com/building-and ... d-firmware
This is the Adafruit fork of micropython on GitHub. It includes the 'unix' directory where you can build an executable version of micropython to run and test with right inside of the VM.
How can I include modules like 'time' in this build? I didn't see a 'modules' subfolder. I'm happy to read a doc if there is one available.
Thanks,
J
Code: Select all
vagrant@vagrant-ubuntu-trusty-64:~/micropython$ cd unix/
vagrant@vagrant-ubuntu-trusty-64:~/micropython/unix$ ls
alloc.c fdfile.h micropython modtermios.c mpconfigport_minimal.h scripts
array.py file.c micropython.map modtime.c mpconfigport.mk unix_mphal.c
build gccollect.c modffi.c moduselect.c mpconfigport_nanbox.h
callfunc.py input.c modjni.c mpconfigport_coverage.h mphalport.h
classes.py input.h modmachine.c mpconfigport_fast.h mpthreadport.c
coverage.c main.c modos.c mpconfigport_freedos.h mpthreadport.h
fatfs_port.c Makefile modsocket.c mpconfigport.h qstrdefsport.h
vagrant@vagrant-ubuntu-trusty-64:~/micropython/unix$ ./micropython
MicroPython v1.8.6-234-gefa206d on 2016-12-22; linux version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> import time
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'time'