equal
deleted
inserted
replaced
1270 pass |
1270 pass |
1271 except ImportError: |
1271 except ImportError: |
1272 pass |
1272 pass |
1273 return 80 |
1273 return 80 |
1274 |
1274 |
1275 def wrap(line, hangindent, width=78): |
1275 def wrap(line, hangindent, width=None): |
|
1276 if width is None: |
|
1277 width = termwidth() - 2 |
1276 padding = '\n' + ' ' * hangindent |
1278 padding = '\n' + ' ' * hangindent |
1277 return padding.join(textwrap.wrap(line, width=width - hangindent)) |
1279 return padding.join(textwrap.wrap(line, width=width - hangindent)) |
1278 |
1280 |
1279 def iterlines(iterator): |
1281 def iterlines(iterator): |
1280 for chunk in iterator: |
1282 for chunk in iterator: |