Message196455
Yes, argparse has same problem.
>>> import os, argparse
>>> p = argparse.ArgumentParser(prog='PROG')
>>> os.environ['COLUMNS'] = '16'
>>> print(p.format_help())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/serhiy/py/cpython/Lib/argparse.py", line 2329, in format_help
return formatter.format_help()
File "/home/serhiy/py/cpython/Lib/argparse.py", line 276, in format_help
help = self._root_section.format_help()
File "/home/serhiy/py/cpython/Lib/argparse.py", line 206, in format_help
func(*args)
File "/home/serhiy/py/cpython/Lib/argparse.py", line 206, in format_help
func(*args)
File "/home/serhiy/py/cpython/Lib/argparse.py", line 514, in _format_action
help_lines = self._split_lines(help_text, help_width)
File "/home/serhiy/py/cpython/Lib/argparse.py", line 614, in _split_lines
return _textwrap.wrap(text, width)
File "/home/serhiy/py/cpython/Lib/textwrap.py", line 355, in wrap
return w.wrap(text)
File "/home/serhiy/py/cpython/Lib/textwrap.py", line 300, in wrap
return self._wrap_chunks(chunks)
File "/home/serhiy/py/cpython/Lib/textwrap.py", line 227, in _wrap_chunks
raise ValueError("invalid width %r (must be > 0)" % self.width)
ValueError: invalid width 0 (must be > 0) |
|
Date |
User |
Action |
Args |
2013-08-29 10:57:16 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, bethard, aronacher, ezio.melotti, adambyrtek |
2013-08-29 10:57:16 | serhiy.storchaka | set | messageid: <1377773836.56.0.755362850917.issue13107@psf.upfronthosting.co.za> |
2013-08-29 10:57:16 | serhiy.storchaka | link | issue13107 messages |
2013-08-29 10:57:15 | serhiy.storchaka | create | |
|