ciscoconfparse.IOSConfigList Object

class ciscoconfparse.IOSConfigList(data=None, comment_delimiter='!', debug=False, factory=False, ignore_blank_lines=True, syntax='ios', CiscoConfParse=None)

A custom list to hold IOSCfgLine objects. Most people will never need to use this class directly.

Initialize the class.


A list of parsed IOSCfgLine objects


A comment delimiter. This should only be changed when parsing non-Cisco IOS configurations, which do not use a ! as the comment delimiter. comment defaults to ‘!’


debug defaults to False, and should be kept that way unless you’re working on a very tricky config parsing problem. Debug output is not particularly friendly


ignore_blank_lines defaults to True; when this is set True, ciscoconfparse ignores blank configuration lines. You might want to set ignore_blank_lines to False if you intentionally use blank lines in your configuration (ref: Github Issue #2).

An instance of an IOSConfigList object.

Return repr(self).


Return str(self).


S.append(value) – append value to the end of the sequence

clear() → None – remove all items from S

Walk this configuration and return the following tuple at each parent ‘level’: (list_of_parent_sibling_objs, list_of_nonparent_sibling_objs)

count(value) → integer – return number of occurrences of value

S.extend(iterable) – extend sequence by appending elements from the iterable

index(value[, start[, stop]]) → integer – return first index of value.

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

insert(ii, val)

S.insert(index, value) – insert value before index

pop([index]) → item – remove and return item at index (default last).

Raise IndexError if list is empty or index is out of range.


S.remove(value) – remove first occurrence of value. Raise ValueError if the value is not present.


S.reverse() – reverse IN PLACE