![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|


Public Member Functions | |
| get_indented (self, until_blank=False, strip_indent=True) | |
| get_known_indented (self, indent, until_blank=False, strip_indent=True) | |
| get_first_known_indented (self, indent, until_blank=False, strip_indent=True, strip_top=True) | |
Public Member Functions inherited from docutils.statemachine.StateMachine | |
| __init__ (self, state_classes, initial_state, debug=False) | |
| unlink (self) | |
| run (self, input_lines, input_offset=0, context=None, input_source=None, initial_state=None) | |
| get_state (self, next_state=None) | |
| next_line (self, n=1) | |
| is_next_line_blank (self) | |
| at_eof (self) | |
| at_bof (self) | |
| previous_line (self, n=1) | |
| goto_line (self, line_offset) | |
| get_source (self, line_offset) | |
| abs_line_offset (self) | |
| abs_line_number (self) | |
| get_source_and_line (self, lineno=None) | |
| insert_input (self, input_lines, source) | |
| get_text_block (self, flush_left=False) | |
| check_line (self, context, state, transitions=None) | |
| add_state (self, state_class) | |
| add_states (self, state_classes) | |
| runtime_init (self) | |
| error (self) | |
| attach_observer (self, observer) | |
| detach_observer (self, observer) | |
| notify_observers (self) | |
Public Attributes | |
| line_offset | |
Public Attributes inherited from docutils.statemachine.StateMachine | |
| input_lines | |
| input_offset | |
| line | |
| line_offset | |
| debug | |
| initial_state | |
| current_state | |
| states | |
| observers | |
`StateMachine` subclass specialized for whitespace recognition. There are three methods provided for extracting indented text blocks: - `get_indented()`: use when the indent is unknown. - `get_known_indented()`: use when the indent is known for all lines. - `get_first_known_indented()`: use when only the first line's indent is known.
| docutils.statemachine.StateMachineWS.get_first_known_indented | ( | self, | |
| indent, | |||
until_blank = False, |
|||
strip_indent = True, |
|||
strip_top = True |
|||
| ) |
Return an indented block and info.
Extract an indented block where the indent is known for the first line
and unknown for all other lines.
:Parameters:
- `indent`: The first line's indent (# of columns/characters).
- `until_blank`: Stop collecting at the first blank line if true
(1).
- `strip_indent`: Strip `indent` characters of indentation if true
(1, default).
- `strip_top`: Strip blank lines from the beginning of the block.
:Return:
- the indented block,
- its indent,
- its first line offset from BOF, and
- whether or not it finished with a blank line.
| docutils.statemachine.StateMachineWS.get_indented | ( | self, | |
until_blank = False, |
|||
strip_indent = True |
|||
| ) |
Return a block of indented lines of text, and info.
Extract an indented block where the indent is unknown for all lines.
:Parameters:
- `until_blank`: Stop collecting at the first blank line if true.
- `strip_indent`: Strip common leading indent if true (default).
:Return:
- the indented block (a list of lines of text),
- its indent,
- its first line offset from BOF, and
- whether or not it finished with a blank line.
| docutils.statemachine.StateMachineWS.get_known_indented | ( | self, | |
| indent, | |||
until_blank = False, |
|||
strip_indent = True |
|||
| ) |
Return an indented block and info.
Extract an indented block where the indent is known for all lines.
Starting with the current line, extract the entire text block with at
least `indent` indentation (which must be whitespace, except for the
first line).
:Parameters:
- `indent`: The number of indent columns/characters.
- `until_blank`: Stop collecting at the first blank line if true.
- `strip_indent`: Strip `indent` characters of indentation if true
(default).
:Return:
- the indented block,
- its first line offset from BOF, and
- whether or not it finished with a blank line.