Print the elements of iterable x to stdout. Optional arg width (default 70) is the maximum line length. Optional arg indent (default 4) is the number of blanks with which to begin each line.
(x, width=70, indent=4, file=None)
| 108 | |
| 109 | |
| 110 | def printlist(x, width=70, indent=4, file=None): |
| 111 | """Print the elements of iterable x to stdout. |
| 112 | |
| 113 | Optional arg width (default 70) is the maximum line length. |
| 114 | Optional arg indent (default 4) is the number of blanks with which to |
| 115 | begin each line. |
| 116 | """ |
| 117 | |
| 118 | blanks = ' ' * indent |
| 119 | # Print the sorted list: 'x' may be a '--random' list or a set() |
| 120 | print(textwrap.fill(' '.join(str(elt) for elt in sorted(x)), width, |
| 121 | initial_indent=blanks, subsequent_indent=blanks), |
| 122 | file=file) |
| 123 | |
| 124 | |
| 125 | def print_warning(msg: str) -> None: |
searching dependent graphs…