Assuming I have this 3 directory structure.
- Dir_A
- Dir_B
- b.py
- Dir_C
- c.py
- Dir_B
So Dir_B and Dir_C are subdirectories of Dir_A and they each contain 1 .py file. b.py needs to import c.py and I want to be able to run b.py while I"m in either the Dir_B directory or the Dir_A directory. What is the cleanest/simplest way to do the import of b.py? I know I can modify the sys.path but not sure how to do it and the import cleanly and portably so it works in both of these cases.