Python: module xplorDoc
 
xplorDoc
index


 
Generate Python documentation in HTML or text for interactive use using
modifications to the Python pydoc module.

 
Classes
       
pydoc.HTMLDoc(pydoc.Doc)
HTMLDoc
pydoc.Helper(builtins.object)
Helper
pydoc.ModuleScanner(builtins.object)
ModuleScanner
pydoc.TextDoc(pydoc.Doc)
TextDoc

 
class HTMLDoc(pydoc.HTMLDoc)
    Formatter class for Xplor-NIH HTML documentation.
 
 
Method resolution order:
HTMLDoc
pydoc.HTMLDoc
pydoc.Doc
builtins.object

Methods defined here:
classlink(self, object, modname)
Make a link for a class.
docdata(self, object, name=None, mod=None, cl=None)
Produce html documentation for a data descriptor.
docmodule(self, object, name=None, mod=None, *ignored)
Produce HTML documentation for a module object.
docproperty = docdata(self, object, name=None, mod=None, cl=None)
escape(text) from pydoc.HTMLRepr
filelink(self, url, path)
file: links don't work on the network, so a different approach
should be taken, where all possible pages are generated, then a proper
https: link made. As it is, this simply doesn't work, and exposes 
local path/username info.
markup(self, text, escape=None, funcs={}, classes={}, methods={})
Mark up some plain text, given a context of symbols to look for.
some simple tags are defined:
   <\m NAME>        - creates a link for Xplor-NIH module named NAME
   <\s NAME>        - creates a link for Python module named NAME
   <\l LINK NAME>   - creates a link LINK with tag NAME
    <string>

block

 - process a block of text as reStructedText.
[In each case, please do not include the backslash character.]
Each context dictionary maps object names to anchor names.
modulelink(self, object)
Make a link for a module.
repr(object) from pydoc.HTMLRepr

Methods inherited from pydoc.HTMLDoc:
bigsection(self, title, *args)
Format a section with a big heading.
docclass(self, object, name=None, mod=None, funcs={}, classes={}, *ignored)
Produce HTML documentation for a class object.
docother(self, object, name=None, mod=None, *ignored)
Produce HTML documentation for a data object.
docroutine(self, object, name=None, mod=None, funcs={}, classes={}, methods={}, cl=None)
Produce HTML documentation for a function or method object.
formattree(self, tree, modname, parent=None)
Produce HTML for a class tree as given by inspect.getclasstree().
formatvalue(self, object)
Format an argument default value as text.
grey(self, text)
heading(self, title, extras='')
Format a page heading.
index(self, dir, shadowed=None)
Generate an HTML index for a directory of modules.
modpkglink(self, modpkginfo)
Make a link for a module or package to display in an index.
multicolumn(self, list, format)
Format a list of items into a multi-column list.
namelink(self, name, *dicts)
Make a link for an identifier, given name-to-URL mappings.
page(self, title, contents)
Format an HTML page.
preformat(self, text)
Format literal preformatted text.
section(self, title, cls, contents, width=6, prelude='', marginalia=None, gap='&nbsp;')
Format a section with a heading.

Methods inherited from pydoc.Doc:
document(self, object, name=None, *args)
Generate documentation for an object.
fail(self, object, name=None, *args)
Raise an exception for unimplemented types.
getdocloc(self, object, basedir='/home/schwitrs/xplor/python/bin.Linux_x86_64/lib/python3.11')
Return the location of module docs or None

Data descriptors inherited from pydoc.Doc:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

Data and other attributes inherited from pydoc.Doc:
PYTHONDOCS = 'https://docs.python.org/3.11/library'

 
class Helper(pydoc.Helper)
    Helper(input=None, output=None)
 

 
 
Method resolution order:
Helper
pydoc.Helper
builtins.object

Methods defined here:
__call__(self, request=<object object at 0x7f4949db4700>)
Call self as a function.
help(self, request)

Methods inherited from pydoc.Helper:
__init__(self, input=None, output=None)
Initialize self.  See help(type(self)) for accurate signature.
__repr__(self)
Return repr(self).
getline(self, prompt)
Read one line, using input() when appropriate.
interact(self)
intro(self)
list(self, items, columns=4, width=80)
listkeywords(self)
listmodules(self, key='')
listsymbols(self)
listtopics(self)
showsymbol(self, symbol)
showtopic(self, topic, more_xrefs='')

Readonly properties inherited from pydoc.Helper:
input

 
output

 

Data descriptors inherited from pydoc.Helper:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

Data and other attributes inherited from pydoc.Helper:
keywords = {'False': '', 'None': '', 'True': '', 'and': 'BOOLEAN', 'as': 'with', 'assert': ('assert', ''), 'async': ('async', ''), 'await': ('await', ''), 'break': ('break', 'while for'), 'class': ('class', 'CLASSES SPECIALMETHODS'), ...}
symbols = {'!=': 'OPERATORS COMPARISON', '"': 'STRINGS', '"""': 'STRINGS', '%': 'OPERATORS FORMATTING', '%=': 'AUGMENTEDASSIGNMENT', '&': 'OPERATORS BITWISE', '&=': 'AUGMENTEDASSIGNMENT', "'": 'STRINGS', "'''": 'STRINGS', '(': 'TUPLES FUNCTIONS CALLS', ...}
topics = {'ASSERTION': 'assert', 'ASSIGNMENT': ('assignment', 'AUGMENTEDASSIGNMENT'), 'ATTRIBUTEMETHODS': ('attribute-access', 'ATTRIBUTES SPECIALMETHODS'), 'ATTRIBUTES': ('attribute-references', 'getattr hasattr setattr ATTRIBUTEMETHODS'), 'AUGMENTEDASSIGNMENT': ('augassign', 'NUMBERMETHODS'), 'BASICMETHODS': ('customization', 'hash repr str SPECIALMETHODS'), 'BINARY': ('binary', 'EXPRESSIONS'), 'BITWISE': ('bitwise', 'EXPRESSIONS'), 'BOOLEAN': ('booleans', 'EXPRESSIONS TRUTHVALUE'), 'CALLABLEMETHODS': ('callable-types', 'CALLS SPECIALMETHODS'), ...}

 
class ModuleScanner(pydoc.ModuleScanner)
    An interruptible scanner that searches module synopses.
 
 
Method resolution order:
ModuleScanner
pydoc.ModuleScanner
builtins.object

Methods defined here:
run(self, callback, key=None, completer=None, onerror=None)

Data descriptors inherited from pydoc.ModuleScanner:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class TextDoc(pydoc.TextDoc)
    Formatter class for text documentation.
 
 
Method resolution order:
TextDoc
pydoc.TextDoc
pydoc.Doc
builtins.object

Methods defined here:
docclass(self, object, name=None, mod=None, *ignored)
Produce text documentation for a given class object. This
differs from the version in the base class by the version of getdoc
called.
docmodule(self, object, name=None, mod=None)
Produce text documentation for a given module object.
docroutine(self, object, name=None, mod=None, cl=None)
Produce text documentation for a function or method object.
markup(self, text)
remove markup tags.
repr(x) from pydoc.TextRepr
section(self, title, contents)
Format a section with a given heading.

Methods inherited from pydoc.TextDoc:
bold(self, text)
Format a string in bold by overstriking.
docdata(self, object, name=None, mod=None, cl=None)
Produce text documentation for a data descriptor.
docother(self, object, name=None, mod=None, parent=None, maxlen=None, doc=None)
Produce text documentation for a data object.
docproperty = docdata(self, object, name=None, mod=None, cl=None)
formattree(self, tree, modname, parent=None, prefix='')
Render in text a class tree as returned by inspect.getclasstree().
formatvalue(self, object)
Format an argument default value as text.
indent(self, text, prefix=' ')
Indent text by prepending a given prefix to each line.

Methods inherited from pydoc.Doc:
document(self, object, name=None, *args)
Generate documentation for an object.
fail(self, object, name=None, *args)
Raise an exception for unimplemented types.
getdocloc(self, object, basedir='/home/schwitrs/xplor/python/bin.Linux_x86_64/lib/python3.11')
Return the location of module docs or None

Data descriptors inherited from pydoc.Doc:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

Data and other attributes inherited from pydoc.Doc:
PYTHONDOCS = 'https://docs.python.org/3.11/library'

 
Functions
       
apropos(key, scanContents=False)
Print all the one-line module summaries that contain a substring.
If scanContents argument is True, scan full module documentation for
the substring.
browse(port=0, *, open_browser=True, hostname='localhost')
Start the enhanced pydoc Web server and open a Web browser.
 
Use port '0' to start the server on an arbitrary port.
Set open_browser to False to suppress opening a browser.
cli()
Command-line interface (looks at sys.argv to decide what to do).
doc(thing, title='Python Library Documentation: %s', forceload=0, output=None)
Display text documentation, given an object or a path to an object.
find_string_literal(s, begin=0)
find single-line strings which aren't in HTML tags, and aren't
already marked up
 
This won't work inside multiline regions, such as docstrings - strings
declared within the docstrings will be marked up.
getdoc(thing)
Get the doc string or comments for an object.
includeDirModules(dir)
pathdirs()
Convert sys.path into a list of absolute, existing, unique paths.
processRSTblock(inString, outputType, part='whole')
Given the input reStructuredText string,
format them according to outputType, and return the specified 
document part.
processRSTblocks(string, outputType, part='whole')
Given the input string, find blocks delimied by  <string>
...

tags, and format them according to outputType.
render_doc(thing, title='Python Library Documentation: %s', forceload=0, renderer=None)
Render text documentation, given an object or a path to an object.
serve(port, callback=None, completer=None)
source2HTML(filename)
Colorize/markup Python source code.
 
Pass filename.  writes output to filename.html
 
Strings are marked as green, while comments are made red.
doc strings are made Blue. Functions are made Bold and
classes Copper.
stripid(text)
Remove the hexadecimal id from a Python object representation.
writeIndex(moduleList)
writedoc(thing, forceload=0)
Write HTML documentation to a file in the current directory.
xplorSynopsis(modname, cache={}, scanContents=False)
Get the one-line summary out of a Xplor-NIH module file.

 
Data
        arch = 'Linux_x86_64'
environ = environ({'ARCH': 'Linux_x86_64', 'MWWM': 'allwm'...ib/Linux_x86_64::/usr/local/lib:/usr/local/lib'})
footer = '<!--#include virtual="/footer3.html" -->'
header = '<!--#include virtual="/header3.html" -->'
help = <xplorDoc.Helper instance>
help_xplorDoc_dontCall = 1
html = <xplorDoc.HTMLDoc object>
includedModules = []
initSysPath = ['/home/schwitrs/bzr-repo/xplor-python3/bin.Linux_x86_64', '/home/schwitrs/xplor/bin.Linux_x86_64', '/home/schwitrs/xplor/python', '/home/schwitrs/xplor/python/bin.Linux_x86_64', '/home/schwitrs/xplor/python/bin.Linux_x86_64/lib/python3.11', '/home/schwitrs/xplor/python/bin.Linux_x86_64/lib/python3.11/lib-dynload', '/home/schwitrs/xplor/python/bin.Linux_x86_64/lib/python3.11/site-packages', '/home/schwitrs/.xplornih/python', '.']
markup_re = re.compile('[^\\n]*((</FONT)|(</STRONG))')
moduleBlacklist = [r'numarray\..*', r'numpy\..*', r'matplotlib\..*', r'pyx\..*', r'test\..*', r'bzrlib\..*test.*', 'version', r'IPython\..*', 'win32clip', 'siteconfig', 'bzr.*']
modulesProcessed = []
pyDocURL = 'https://docs.python.org/3/library/'
pythonModules = ['__builtin__', 'xplor', 'repr', 'exceptions', 'glob']
string_re = re.compile('((\'[^\'\\n]+\')|("[^"\\n]+"))')
text = <xplorDoc.TextDoc object>
xplorDir = '/home/schwitrs/xplor'
xplorPaths = {'high': '/home/schwitrs/xplor/python/', 'low': '/home/schwitrs/xplor/bin.Linux_x86_64/'}