[issue13041] argparse: terminal width is not detected properly

2018-07-25 Thread Berker Peksag


Change by Berker Peksag :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.8 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13041] argparse: terminal width is not detected properly

2018-07-25 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 74102c9a5f2327c4fc47feefa072854a53551d1f by Berker Peksag in 
branch 'master':
bpo-13041: Use shutil.get_terminal_size() in argparse.HelpFormatter (GH-8459)
https://github.com/python/cpython/commit/74102c9a5f2327c4fc47feefa072854a53551d1f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13041] argparse: terminal width is not detected properly

2018-07-25 Thread Berker Peksag


Change by Berker Peksag :


--
pull_requests: +7983

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13041] argparse: terminal width is not detected properly

2018-04-13 Thread Mark Lawrence

Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13041] argparse: terminal width is not detected properly

2018-04-13 Thread Julian Mehnle

Julian Mehnle  added the comment:

What's holding up the merging of this patch?

--
nosy: +jmehnle

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue13041] argparse: terminal width is not detected properly

2014-07-23 Thread paul j3

paul j3 added the comment:

For now the user could add this to his module:

import os, shutil
os.environ['COLUMNS'] = str(shutil.get_terminal_size().columns)

--

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




[issue13041] argparse: terminal width is not detected properly

2014-07-16 Thread Mark Lawrence

Mark Lawrence added the comment:

@Paul the attached patch is extremely simple and follows the work on #13609.  
Is it okay with you if the patch was committed?

--
nosy: +BreamoreBoy, paul.j3

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



[issue13041] argparse: terminal width is not detected properly

2014-07-16 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
nosy: +berker.peksag
type: behavior - enhancement
versions: +Python 3.5 -Python 3.3

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



[issue13041] argparse: terminal width is not detected properly

2014-07-16 Thread paul j3

paul j3 added the comment:

The latest patch, using _shutil.get_terminal_size(), looks fine.  

It lets environ['COLUMNS'] have priority over the end user's terminal width, as 
demonstrated by the change to test_argparse.  test_argparse doesn't test 
changing the actual terminal size, but I imagine that would be a pain to 
implement.

--

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



[issue13041] argparse: terminal width is not detected properly

2012-02-22 Thread Zbyszek Szmek

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

OK, I guess that this could now be closed, since 13609 has been commited.
(It is currently reopened, but the proposed tweaks wouldn't influence
the usage in argparse, even if accepted).

I'm attaching a patch which updates the tests to the new $COLUMNS logic.
Previously, unsetting COLUMNS would fix the width on 80, now setting
COLUMNS=80 is the proper way to do this.

--
Added file: http://bugs.python.org/file24602/issue13041.patch

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



[issue13041] argparse: terminal width is not detected properly

2012-02-22 Thread Zbyszek Szmek

Changes by Zbyszek Szmek zbys...@in.waw.pl:


Removed file: http://bugs.python.org/file23241/patch1.1.diff

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



[issue13041] argparse: terminal width is not detected properly

2012-02-22 Thread Zbyszek Szmek

Changes by Zbyszek Szmek zbys...@in.waw.pl:


Removed file: http://bugs.python.org/file23238/patch1.diff

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



[issue13041] argparse: terminal width is not detected properly

2012-02-22 Thread Zbyszek Szmek

Changes by Zbyszek Szmek zbys...@in.waw.pl:


Removed file: http://bugs.python.org/file24152/patch2.diff

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



[issue13041] argparse: terminal width is not detected properly

2012-01-06 Thread Zbyszek Szmek

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

New version to use after #13609 is implemented: patch2.diff

--
Added file: http://bugs.python.org/file24152/patch2.diff

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



[issue13041] argparse: terminal width is not detected properly

2011-12-16 Thread Giampaolo Rodola'

Changes by Giampaolo Rodola' g.rod...@gmail.com:


--
dependencies: +Add os.get_terminal_size() function
versions:  -Python 2.7, Python 3.2

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



[issue13041] argparse: terminal width is not detected properly

2011-12-15 Thread Steven Bethard

Steven Bethard steven.beth...@gmail.com added the comment:

I'd feel more comfortable with the argparse fix if it were simply calling 
os.get_terminal_size(). I recommend that you:

* Create a new issue called, say add os.get_terminal_size() proposing just 
the single method.

* Add that issue to the Dependencies of this issue.

Once that is fixed, then the argparse fix should be simple.

--
versions: +Python 2.7, Python 3.2

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



[issue13041] argparse: terminal width is not detected properly

2011-12-15 Thread Denilson Figueiredo de Sá

Denilson Figueiredo de Sá denilso...@gmail.com added the comment:

Issue #13609 created, but I don't have permission to edit the dependencies.

--

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



[issue13041] argparse: terminal width is not detected properly

2011-10-27 Thread Florent Xicluna

Changes by Florent Xicluna florent.xicl...@gmail.com:


--
nosy: +flox
stage:  - patch review
versions:  -Python 3.4

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



[issue13041] argparse: terminal width is not detected properly

2011-09-25 Thread Zbyszek Szmek

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

I see that adding a separate module was proposed in issue #8408, which was 
rejected/closed. I don't have the rights to reopen, so I'll continue here.

#8408 was proposing a new module, which seems a bit overkill, since the 
implementation for unix and windows is about 20 lines.

I'm attaching a second version of the patch which works on windows (tested with 
python3.2.2 on XP). Thanks to techtonik for pointing to a windows imlementation.

--
Added file: http://bugs.python.org/file23241/patch1.1.diff

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



[issue13041] argparse: terminal width is not detected properly

2011-09-25 Thread Denilson Figueiredo de Sá

Denilson Figueiredo de Sá denilso...@gmail.com added the comment:

 #8408 was proposing a new module, which seems a bit overkill

If a module seems overkill, then maybe add this useful function to os module. 
Don't leave it private to argparse module. Maybe something along these lines:

 import os
 print(os.get_terminal_size())
(80, 25)

Why do I believe a module could be better? Because I'd also like some way to 
detect when the terminal size has changed (without probing it all the time).

--

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



[issue13041] 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: 144507
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/file23238/patch1.diff

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



[issue13041] argparse: terminal width is not detected properly

2011-09-24 Thread Ezio Melotti

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


--
nosy: +bethard

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



[issue13041] argparse: terminal width is not detected properly

2011-09-24 Thread Denilson Figueiredo de Sá

Changes by Denilson Figueiredo de Sá denilso...@gmail.com:


--
nosy: +denilsonsa

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