The best way to do this is to not do it at all. For what reasons you first of all transferred them - for the sake of organization - you want them to be in a separate module. If you want to refer to a module as a game in your code, you can do this:
from framework import game game.foo()
Usually, when you execute import game , you expect that game is either system or in the script folder. If it is not, it will throw people away. If you created your system library, you would not have it as three separate libraries util , game and render , no? You pack it into one library - the framework - and distribute it using submodules. So you really don't want to do this.
But, since I know that non-answers can be disappointing, if you really want to continue, you can add the framework folder to sys.path , which python checks whenever you import a module:
import sys sys.path.append("framework") import game
source share