Author zbysz
Recipients bethard, georg.brandl, terry.reedy, zbysz
Date 2012-01-07.08:50:28
SpamBayes Score 2.29092e-06
Marked as misclassified No
Message-id <>
> 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 
> that argparse is calling it wrong. Except that it is not on my system. 
That's really surprising, because it is all pure Python code and don't
really see how it _could_ be right: take $COLUMNS, subtract, subtract,
and sooner or later _width will go below 0.

> Could you add 'print(width)' before the call to textwrap
>     return _textwrap.wrap(text, width)
> to see if -1 is being passed?
Prints -1.

> The code works fine on 3.2.2, Win7, IDLE, narrowest window possible (about 14 
> chars), which actually wraps to the window width. 
Oh, I just tried it in IDLE and it prints:
  usage: ...
in a very small window (30 cells wide). So IDLE is just doesn't allow you to
go below a certain size.

See also #13107.
Date User Action Args
2012-01-07 08:50:30zbyszsetrecipients: + zbysz, georg.brandl, terry.reedy, bethard
2012-01-07 08:50:30zbyszsetmessageid: <>
2012-01-07 08:50:29zbyszlinkissue13720 messages
2012-01-07 08:50:28zbyszcreate