Hi,
Our team is developing a Slicer module.
We want to split our code into different python files (are in subfolders). It works to import variables and functions (for example) from modules to main, but when we try to import a class (or function) of the main module to an extension, it does not work. Any suggestion? See image for hierarchy. Thank you in advance!
If that function or class is used by subcomponents, it would be better to extract it from the main module and put it into its own file in your subfolder. That way, every component (including the main module) can import it from the same location.
Ok thanks for the follow-up! We effectively had some circular imports. Has been managed by re-organization of the classes and code. Thanks!