On Mon, Jul 7, 2014 at 5:57 PM, Steven D'Aprano <st...@pearwood.info> wrote:
> Can anyone explain how "import pg" can end up coming from pgmodule.so?

First guess: There's a "pg.py" somewhere that imports the so, then
replaces itself in sys.modules.

# importme.py
import sys
sys.modules["importme"]=sys


>>> import importme
>>> importme
<module 'sys' (built-in)>

Unfortunately, that doesn't help much with actually finding the source
code that's doing this.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to