[issue13042] argparse: terminal width is not detected properly

2011-09-24 Thread Zbyszek Szmek

New submission from Zbyszek Szmek zbys...@in.waw.pl:

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.

Why COLUMNS is not exported? Because it can change during the lifetime
of a program. Therefore it is better to use the dynamic ioctl.

--
components: Library (Lib)
files: patch1.diff
keywords: patch
messages: 144508
nosy: zbysz
priority: normal
severity: normal
status: open
title: argparse: terminal width is not detected properly
type: behavior
versions: Python 3.3, Python 3.4
Added file: http://bugs.python.org/file23239/patch1.diff

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13042
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13042] argparse: terminal width is not detected properly

2011-09-24 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
resolution:  - duplicate
stage:  - committed/rejected
status: open - closed
superseder:  - argparse: terminal width is not detected properly

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13042
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13042] argparse: terminal width is not detected properly

2011-09-24 Thread Zbyszek Szmek

Zbyszek Szmek zbys...@in.waw.pl added the comment:

Hm, I have somehow submitted the same tex ttwwiiccee. Sorry about that.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue13042
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com