This is the contents of boot.py, as indicated at this url -> http://micropython.org/doc/tut-script
import pyb
#pyb.main('main.py') # main script to run after this one
#pyb.usb_mode('CDC+MSC') # act as a serial and a storage device
#pyb.usb_mode('CDC+HID') # act as a serial device and a mouse
Since everything is commented out, how is it that main.py still gets executed?
the contents of boot.py
Re: the contents of boot.py
Calling pyb.main('foo.py') would set the name of the main script to be main.py.
If you don't call pyb.main, then the default script name of 'main.py' is used.
So not calling pyb.main and calling pyb.main('main.py') both do the same thing.
If you don't call pyb.main, then the default script name of 'main.py' is used.
So not calling pyb.main and calling pyb.main('main.py') both do the same thing.
Re: the contents of boot.py
I guess you meant "foo.py"? :)dhylands wrote:Calling pyb.main('foo.py') would set the name of the main script to be main.py.
Re: the contents of boot.py
Bah - yes.
That's what happens when you get distracted in the middle of typing a response.
That's what happens when you get distracted in the middle of typing a response.