PSCF v1.3
pscfpp.text.Wrapper Class Reference

Class to wrap line breaks. More...

Public Member Functions

 __init__ (self, eol='\n', nIndent=0)
 Constructor.
 clear (self)
 Clear mutable attributes (column and text).
 append (self, string)
 Add contents of string to wrapped text.
 __str__ (self)
 Return string containing wrapped text (self.text).
 __repr__ (self)
 Return string containing wrapped text (self.text).

Detailed Description

Class to wrap line breaks.

Definition at line 12 of file text.py.

Constructor & Destructor Documentation

◆ __init__()

pscfpp.text.Wrapper.__init__ ( self,
eol = '\n',
nIndent = 0 )

Constructor.

Data attributes:

  • eol : end-of-line character
  • nIndent : number of spaces preceding each line
  • column : current column index (cursor)
  • limit : maximum number of columns (78 by default)
  • text : string containing resuling wrapped text
Parameters
eolend-of-line character
nIndentnumber of space preceding each line

Definition at line 28 of file text.py.

References column, eol, limit, nIndent, and text.

Member Function Documentation

◆ clear()

pscfpp.text.Wrapper.clear ( self)

Clear mutable attributes (column and text).

Definition at line 38 of file text.py.

References column, and text.

◆ append()

pscfpp.text.Wrapper.append ( self,
string )

Add contents of string to wrapped text.

Parameters
stringinput string

Definition at line 47 of file text.py.

References column, eol, limit, nIndent, and text.

◆ __str__()

pscfpp.text.Wrapper.__str__ ( self)

Return string containing wrapped text (self.text).

Definition at line 64 of file text.py.

References text.

◆ __repr__()

pscfpp.text.Wrapper.__repr__ ( self)

Return string containing wrapped text (self.text).

Definition at line 70 of file text.py.

References text.


The documentation for this class was generated from the following file: