2

I have a module that gatherd like below and result in one .pyd file.
But when importing it all inner loaded modules will be visible to user by a simple python biltin dir(). so is there a way to hide them from user?

#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"

the test file:

>>> import et
>>> print dir(et)
it will print a list of all internal loaded modules, functions and ...
wtayyeb
  • 1,879
  • 2
  • 18
  • 38
  • Well, I don't think so (I might be wrong), but if you create a single `et` module (composed by the other features contained in the included files) as described here: http://stackoverflow.com/a/19698914/1715716, you'll obviously get ride of the submodules. But I don't know if the solution linked above is an option for you... – Gauthier Boaglio Oct 31 '13 at 05:35
  • I mean internal loaded models like builtin models (datetime, time, os ...), some third-party models and also some self created modules. – wtayyeb Nov 01 '13 at 13:16

0 Answers0