Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Here's the current folder hierarchy:
- - run.py
- - util/
- - __init__.py
- - entry.py
- - winrate.py
- Let's say winrate.py straight up imports entry:
- ```winrate.py
- import entry
- ```
- and run.py imports util. If run.py wants access to entry and winrate, that means the __init__ needs to be something like:
- ```__init__.py
- from util import entry, winrate
- ```
- If I run winrate.py from inside the util folder, everything's fine. If I try importing it through util into run.py, I need to change the `import entry` line to `from util import entry`, which means I can no longer run it from the util folder.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement