Hi,

following up on this thread on StackOverflow http://stackoverflow.com/questions/16515347/python-import-hooks-and-main 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__.

Hook: https://github.com/srkunze/fork/blob/2e7ecd4b0a/fork.py#L429
Dirty Magic to get things running: https://github.com/srkunze/fork/blob/2e7ecd4b0a/fork.py#L425

Best,
Sven
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to