cython,隐藏或删除对已编译pyd中内部加载模块的访问

时间:2013-10-29 17:19:42

标签: cython

我有一个像下面这样收集的模块,并生成一个.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 ...

0 个答案:

没有答案