w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Pydev tags import as "unresolved import" but code using this import works fine.

So, what you're seeing here is their distribution model. Usually a module will have one root import that everything stems from, but that's not necessarily the case. They're providing a package with (what I assume) is many modules that don't interact with each other; or they can all stand alone.

instead of importing each package individually, you could use the 'from' keyword:

from ROOTFOL.PACKAGE import *

which will grab everything inside that sub-module. You could e-mail the developer and ask why they deployed it this way...or you could add your own __init__.py to the root folder and,

from ROOTFOL import * 

which will walk the tree. Good luck!





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.