[issue13042] argparse: terminal width is not detected properly

2011-09-24 Thread Zbyszek Szmek
Zbyszek Szmek added the comment: Hm, I have somehow submitted the same tex ttwwiiccee. Sorry about that. -- ___ Python tracker ___ __

[issue13042] argparse: terminal width is not detected properly

2011-09-24 Thread Ezio Melotti
Changes by Ezio Melotti : -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> argparse: terminal width is not detected properly ___ Python tracker _

[issue13042] argparse: terminal width is not detected properly

2011-09-24 Thread Zbyszek Szmek
New submission from Zbyszek Szmek : COLUMNS is a shell variable (updated whenever the window size changes), that usually isn't exported to programs. Therefore checking for COLUMNS in sys.environ will not work in the majority of cases. The proper check is to use the TIOCGWINSZ ioctl on stdout.