def writedocs(dir, pkgpath='', done=None):
 if (done is None):
  done = {}
 for (importer, modname, ispkg) in pkgutil.walk_packages([dir], pkgpath):
  writedoc(modname)
 return

def writedocs ( dir , pkgpath = '' , done = None ) : if ( done is None ) : done = { } for ( importer , modname , ispkg ) in pkgutil . walk_packages ( [ dir ] , pkgpath ) : writedoc ( modname ) return
write out html documentation for all modules in a directory tree .