def _writepydoc(doc, *args):
ok = True<EOL>if not os.path.isdir(doc):<EOL><INDENT>os.makedirs(doc)<EOL><DEDENT>if os.path.curdir not in sys.path:<EOL><INDENT>sys.path.append(os.path.curdir)<EOL><DEDENT>for f in args:<EOL><INDENT>if f.startswith('<STR_LIT>'): f = f[<NUM_LIT:2>:]<EOL>name = os.path.sep.join(f.strip('<STR_LIT>').split(os.path.sep))<EOL>try:<EOL><INDENT>e = __import__(name)<EOL><DEDENT>except Exception as ex:<EOL><INDENT>raise<EOL><INDENT>_writebrokedoc(doc, ex, name)<EOL>continue<EOL><DEDENT><DEDENT>if name.endswith('<STR_LIT>'):<EOL><INDENT>_writeclientdoc(doc, e)<EOL>continue<EOL><DEDENT>if name.endswith('<STR_LIT>'):<EOL><INDENT>_writetypesdoc(doc, e)<EOL>continue<EOL><DEDENT>try: <EOL><INDENT>_writedoc(doc, e)<EOL><DEDENT>except IndexError as ex:<EOL><INDENT>_writebrokedoc(doc, ex, name)<EOL>continue<EOL><DEDENT><DEDENT>
create pydoc html pages
    doc -- destination directory for documents
    *args -- modules run thru pydoc