[issue13107] Text width in optparse.py can become negative
Elazar Gershuni
report at bugs.python.org
Sun Sep 1 23:10:53 CEST 2013
Elazar Gershuni added the comment:
I think in such case it is reasonable to fail silently, since the information will not be readable anyway.
Is a patch like the attached acceptable? (Sorry, I am new here)
results:
>>> import os, argparse; p = argparse.ArgumentParser(prog='PROG')
>>> os.environ['COLUMNS'] = '0'
>>> print(p.format_help())
usage: PROG
[-h]
optional arguments:
-h, --help
>>>
----------
keywords: +patch
nosy: +elazar
Added file: http://bugs.python.org/file31552/fixargparse.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13107>
_______________________________________
More information about the Python-bugs-list
mailing list