If i want to use the function hello(), what should i do.
I am using VS Code
So My directory looks like this
project
- myapp
- __init__.py (have hello( ) function)
- test.py
- run.py
in __init__.py file
def hello():
print('hello')
in run.py file, if i wrote
from myapp import hello
hello()
it works
However if i try the same thing in test.py, it won't work.
when i searched for answer, someone told me to put sys.path.append(),
i have tried to put un test.py file
import sys
sys.path.append('path\project\myapp')
from myapp import hello
hello()
but still have same error.