ModuleTest.py
Code: Select all
# testing modules on the microbit
try:
from microbit import *
not_microbit=False
except ImportError:
not_microbit=True
print('not microbit')
from Hello import *
print_hello()
Code: Select all
def print_hello():
print('Hello')
return
Traceback (most recent call last):
File "__main__", line 9, in <module>
ImportError: no module named 'Hello'
I can't see in the uflash documentation anyway of making it recognise modules in the same directory, does it need the module to be in a sub directory?
Jim