Package tidy :: Module lib
[hide private]
[frames] | no frames]

Module lib

source code

Classes [hide private]
  Loader
I am a trivial wrapper that eliminates the need for tidy.tidyFoo, so you can just access tidy.Foo
  _OutputSink
  _Sink
  ReportItem
  FactoryDict
I am a dict with a create method and no __setitem__.
  SinkFactory
Mapping for lookup of sinks by handle
  _Document
  DocumentFactory
Functions [hide private]
 
_putByte(handle, c)
Lookup sink by handle and call its putByte method
source code
 
parse(filename, *args, **kwargs)
Open and process filename as an HTML file, returning a processed document object.
source code
 
parseString(st, *args, **kwargs)
Use st as an HTML file, and process it, returning a document object.
source code
Variables [hide private]
  packagedir = '/home/abuild/rpmbuild/BUILD/uTidylib-0.2/tidy'
  private_ctypes = os.path.join(packagedir, 'pvt_ctypes')
  thelib = <CDLL 'libtidy.so', handle 265b2b0 at 7f51be15b110>
  _tidy = <CDLL 'libtidy.so', handle 265b2b0 at 7f51be15b110>
  putByte = <CFunctionType object at 0x7f51be1806d0>
  sinkfactory = {}
  errors = {'missing or malformed argument for option: ': <class...
  docfactory = {}
  __package__ = 'tidy'
  libname = 'libtidy.so'
Function Details [hide private]

parse(filename, *args, **kwargs)

source code 

Open and process filename as an HTML file, returning a processed document object.

Parameters:
  • kwargs - named options to pass to TidyLib for processing the input file.
  • filename - the name of a file to process
Returns:
a document object

parseString(st, *args, **kwargs)

source code 

Use st as an HTML file, and process it, returning a document object.

Parameters:
  • kwargs - named options to pass to TidyLib for processing the input file.
  • st - the string to parse
Returns:
a document object

Variables Details [hide private]

errors

Value:
{'missing or malformed argument for option: ': <class 'tidy.error.Opti\
onArgError'>,
 'unknown option: ': <class 'tidy.error.InvalidOptionError'>}