when running Python test from withing VS Code using CTRL+F5 I'm getting error message
ImportError: attempted relative import with no known parent package
when running Python test from VS Code terminal by using command line
python test_HelloWorld.py
I'm getting error message
ValueError: attempted relative import beyong top-level package
Here is the project structure
How to solve the subject issue(s) with minimal (code/project structure) change efforts?
TIA!
[Update]
I have got the following solution using sys.path correction:
import sys
from pathlib import Path
sys.path[0] = str(Path(sys.path[0]).parent)
but I guess there still could be a more effective solution without source code corrections by using some (VS Code) settings or Python running context/environment settings (files)?