Hi,
Python has an __all__ variable that can be defined in a module to restrict which members of the module should be included in a call `from foo import *`. However specifying which members of the module should be excluded is more difficult. There are three workarounds that I see:
1) Defining __all__ to specify most of the members of the module, except the few that should be excluded.
2) Naming members to be excluded with a leading underscore. e.g. as done here in ctypes:
3) Manually deleting members from the module. e.g. as done here in numpy:
I think it might be cleaner to also allow an __exclude_all__ variable which will exclude some members from being imported.
If both were defined I would imagine __exclude_all__ being applied second.
Best,
George Harding
_______________________________________________