I am very inexperineced and new when it comes to file structures of things like this. I am currently messing around with MicroPython and the Pico-W. I am trying to import a module from another python file but I keep getting this error:
Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: no module named 'foo'
Currently my file structure looks like this:
my-proj:
- main.py
- foo.py
and my code like this:
main.py
________
from foo import bar
bar()
foo.py
________
def bar():
print('foobar')
I have tried moving things in and out of folders, separating them, installing them to the Pico-W, etc. Can't seem to figure it out and I am sure it's simple and I am just blind to it.
Thanks for any help.
you need go to my-proj first.
or add to the environment variables.