我有一个像下面这样收集并生成一个 .pyd 文件的模块。
但是当导入它时,用户可以通过一个简单的 python biltin dir() 看到所有内部加载的模块。那么有没有办法对用户隐藏它们?
#et.pxd file results in et.pyd
include "etfile.py"
include "et_reader.py"
include "et_reader_preferences.py"
include "et_reader_properties.py"
include "et_reader_objects.py"
include "et_writer.py"
测试文件:
>>> import et
>>> print dir(et)
it will print a list of all internal loaded modules, functions and ...