Python Import Hooks and __main__

Sven R. Kunze srkunze at
Tue Aug 18 00:26:33 CEST 2015


following up on this thread on StackOverflow 
does somebody has a great idea how to manage this?

The issue at hand is, that I would like to apply a specific import hook 
right from the beginning of the interpreter run (here, a simple test 
case), i.e. also affecting the import/exec of the module __main__.

Dirty Magic to get things running:


More information about the Python-list mailing list