I tried to solve this using this answer, but I just can't seem to get it to work.
Here is my structure, essentially I'm just writing some basic scripts to help me manage some board game stats I keep.
<workspace>
+-- win_loss/
+-- KeyForgeWL.py
+-- DB/
+-- KeyForgeData.txt
Easy enough. I'm trying to run KeyForgeWL.py, and I want to import data from its sub directory. With the previous answer, I tried this:
import importlib.resources as pkg_resources
from . import DB
I then get: ImportError: attempted relative import with no known parent package
Fine. I convert it to:
import importlib.resources as pkg_resources
from win_loss import DB
That gets me: ModuleNotFoundError: No module named 'win_loss'.
So... I'm at a loss. What am I missing?