def writedoc(thing, forceload=0):
 try:
  (object, name) = resolve(thing, forceload)
  page = html.page(describe(object), html.document(object, name))
  file = open((name + '.html'), 'w')
  file.write(page)
  file.close()
  print 'wrote', (name + '.html')
 except (ImportError, ErrorDuringImport) as value:
  print value

def writedoc ( thing , forceload = 0 ) : try : ( object , name ) = resolve ( thing , forceload ) page = html . page ( describe ( object ) , html . document ( object , name ) ) file = open ( ( name + '.html' ) , 'w' ) file . write ( page ) file . close ( ) print 'wrote' , ( name + '.html' ) except ( ImportError , ErrorDuringImport ) as value : print value
write html documentation to a file in the current directory .