not defined or could not be found?
When the compiler cannot find a module's definition, it tells us it's not defined.
And was it exactly the same? i.e. you had used from a import b, not import a and later a.b() ?
In the second case, you will get name b not defined or a has no property b IIRC.
I am using mostly from a import b, because it saves me work of having to type the module name every time. The compiler tells me the module I have tried to import is not defined. If I copy the modules back to the same folder, everything works. Adding the external path to sys.path is the part that doesn't seem to work here. I assume if the problem would be in the code, it wouldn't work no matter where I place the modules and classes. Example of how I am declaring it below:
sys.path.append(externalModulePath)
from a import b
b.doSomething() <<== Error here, compiler claiming class "b" was not defined, which means module "a" was not found.
The same happens with reload(). I once thought I got it working because the compiler would give me no errors on the line where a module is being reloaded, but errors I get from the imported class I have tried to reload still display the old code, and not the new one. That's how I know nothing was reloaded. Example of how I am declaring it below:
from a import b
reload(a)
b.doSomething() <<== Error here, because module "a" is still using the old code (not reloaded).