How can I share a template class to inherit classes in nested packages?
Hello! I have a similar project with nested packages: System: __init__.py screen.py timehandler.py Controls: __init__.py event.py mouse.py keyboard.py Each file consists of a class. Example for screen.py: class Screen: ... I've discovered that the classes have lot of similarities and I could save many lines of code by inheriting these classes with a shared template class. I would want to make a python file for the template class, which could be imported in each file before their class declaration. Example for screen.py: from template import TemplateClass class Screen(TemplateClass):: ... But I don't want to make an identical template class in each package. How can I make all the classes to be inherited from the template class? * I only want to make 1 file for the template class. * I don't want to change the project structure.