Re: Importlib behaves differently when importing pyd file

2022-11-16 Thread Dieter Maurer
Jach Feng wrote at 2022-11-15 22:52 -0800: >My working directory d:\Works\Python\ has a package 'fitz' looks like this: > >fitz\ >__init__.py >fitz.py >utils.py >_fitz.pyd > >There is a statement in fitz.py: >return importlib.import_module('fitz._fitz') > >It

Importlib behaves differently when importing pyd file

2022-11-16 Thread Jach Feng
My working directory d:\Works\Python\ has a package 'fitz' looks like this: fitz\ __init__.py fitz.py utils.py _fitz.pyd There is a statement in fitz.py: return importlib.import_module('fitz._fitz') It works fine under Python 3.4 interpreter: >>> import fi