main.py, a module util.py, and a subfolder lib with another module, also called util.py. You run main.py from this folder.
util.py:
NAME = "top"
lib/util.py:
NAME = "lib"
main.py:
import sys
sys.path.insert(0, "lib")
import util
print(util.NAME, sys.path[0], len(sys.path) > 1)
What does main.py print?Log in to join the discussion.
Loading…