Serhiy Storchaka added the comment:
Thank you Zbyszek and Steven for your report and patch, but this was fixed in
issue13107.
--
nosy: +serhiy.storchaka
resolution: - duplicate
stage: - committed/rejected
status: open - closed
superseder: - Text width in optparse.py can become
Steven Bethard steven.beth...@gmail.com added the comment:
Definitely a bug here. Attached is a patch and a test, based on Russell Sim's
suggestion, that should fix it.
--
keywords: +patch
versions: +Python 3.4
Added file: http://bugs.python.org/file26486/13720.patch
Russell Sim russell@gmail.com added the comment:
Hi,
I am having the same problem while running ipython in a batch mode emacs.
Apparently you can't even start ipython if the columns are less than 27, since
they use the argparse library for the magic method help printing and they
Zbyszek Szmek zbys...@in.waw.pl added the comment:
What system and version are you running?
Linux (debian amd64), Python is compiled from hg (1ea8b7233fd7).
The error directly comes from textwrap. In the other hand,
textwrap.wrap works with widths down to 1 (on 3.2.2), which suggests
Terry J. Reedy tjre...@udel.edu added the comment:
I am not setting columns, so that might be the important difference.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13720
___
Zbyszek Szmek zbys...@in.waw.pl added the comment:
I am not setting columns, so that might be the important difference.
Yeah, the whole example with IDLE is moot: argparse only checks
$COLUMNS and defaults to 80, so if COLUMNS is not set, you are only
checking if the code works with 80 columns.
Terry J. Reedy tjre...@udel.edu added the comment:
Now I get error, even with Window actually about 100 columns wide.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13720
___
New submission from Zbyszek Szmek zbys...@in.waw.pl:
% cat test_argparse_narrow.py
import argparse
argparse.ArgumentParser().print_help()
% COLUMNS=15 ./python test_argparse_narrow.py
Traceback (most recent call last):
File test_argparse_narrow.py, line 2, in module
Terry J. Reedy tjre...@udel.edu added the comment:
The code works fine on 3.2.2, Win7, IDLE, narrowest window possible (about 14
chars), which actually wraps to the window width. (In command window, lines are
fixed length and scroll bar is added if window is narrowed.) What system and
version