I have a project with a directory structure that looks like:
/foo/baz/__init__.py /bar/foo.py /bar/splat.py
Problem is, /bar/splat.py
refers to the foo.baz
module. This fails with the error No module named baz
because it's trying to search for this module within /bar/foo.py
. I don't want Python to search the bar
module, I want to tell it to search the root foo
module for baz
. How do I do that? In Ruby you'd just prefix the identifier with ::
(In this case, ::Foo::Baz
), is there a Python equivalent to this?