__all__ = ['bar', 'baz'] waz = 5 bar = 10 def baz(): return 'baz' ##this will not be exported if you use import *