Interfaces to create writers are dependent on the specific writer
class being instantiated. The interfaces described below are the
required interfaces which all writers must support once initialized.
Note that while most applications can use the
class as a formatter, the writer must typically be provided by the
alignvalue can be any object, but by convention is a string or
Noneindicates that the writer's ``preferred'' alignment should be used. Conventional
None, indicating that the device's default font should be used, or a tuple of the form (size, italic, bold, teletype). Size will be a string indicating the size of font that should be used; specific strings and their interpretation must be defined by the application. The italic, bold, and teletype values are boolean indicators specifying which of those font attributes should be used.
leveland the logical tag to
margin. Interpretation of the logical tag is at the writer's discretion; the only restriction on the value of the logical tag is that it not be a false value for non-zero values of
stylesvalue is a tuple of arbitrary values; the value
AS_ISshould be ignored. The
stylestuple may be interpreted either as a set or as a stack depending on the requirements of the application and writer implementation.
blanklineblank lines, or the equivelent. The
blanklinevalue will be an integer.
datato the left of the current left margin, if possible. The value of
datais not restricted; treatment of non-string values is entirely application- and writer-dependent. This method will only be called at the beginning of a line.