My file setup is like this:
- main/main.py
- main/sub/foo.py
- main/sub/bar.py
main has import sub.foo, foo has import sub.bar
python main works fine. But python sub\foo doesn't work, it doesn't recognize sub in import sub.bar. I want to be able to run main as well as foo by themselves, how can I do this properly in python3.4.1?
EDIT:
If I change foo to import bar, then python main says that it doesn't recognize bar in import sub.foo
fooshouldimport bar, since it's in the same directory.