[issue10728] argparse.ArgumentParser.print_help uses sys.stdout

2014-02-14 Thread Jan-Philip Gehrcke

Jan-Philip Gehrcke added the comment:

The version action currently writes to stderr. The _VersionAction(Action)'s 
__call__() method finishes off with 

parser.exit(message=formatter.format_help())

and parser.exit() by default writes to stderr.

Here, Steven says Help is definitely intended to print to stdout. and I 
expected the same to happen regarding the version information. Why should it go 
to stderr?

I see that this is a minor problem and only if someone here agrees I would open 
an issue for that.

--
nosy: +jgehrcke

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



[issue10728] argparse.ArgumentParser.print_help uses sys.stdout

2010-12-20 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

Alright, I didn’t know you were doing mass merges.  I personally prefer to 
leave reports open until backported, now I’ll know your habits.

--

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



[issue10728] argparse.ArgumentParser.print_help uses sys.stdout

2010-12-19 Thread Éric Araujo

Éric Araujo mer...@netwok.org added the comment:

This apparently lacks a 2.7 backport.

--
nosy: +eric.araujo

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



[issue10728] argparse.ArgumentParser.print_help uses sys.stdout

2010-12-19 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Like Georg, I'll get to that when I do a mass backport of all my doc fixes.  My 
apologies for missing the beta2 deadline on doing that, but there aren't many 
of them.

--

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



[issue10728] argparse.ArgumentParser.print_help uses sys.stdout

2010-12-18 Thread Steven Bethard

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

Yep, this is a documentation bug. Help is definitely intended to print to 
stdout.

--
versions:  -Python 3.1

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



[issue10728] argparse.ArgumentParser.print_help uses sys.stdout

2010-12-18 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

Fixed in r87372.

--
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

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



[issue10728] argparse.ArgumentParser.print_help uses sys.stdout

2010-12-17 Thread Silvio Ricardo Cordeiro

New submission from Silvio Ricardo Cordeiro silvioricar...@gmail.com:

The documentation at http://docs.python.org/dev/library/argparse.html 
explicitly says that If file is None, sys.stderr is assumed.

However, both print_usage and print_help assume sys.stdout when file=None. The 
helper method _print_message actually does it right, when called with file=None.

--
components: Library (Lib)
messages: 124271
nosy: silvioricardoc
priority: normal
severity: normal
status: open
title: argparse.ArgumentParser.print_help uses sys.stdout
type: behavior
versions: Python 2.6

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



[issue10728] argparse.ArgumentParser.print_help uses sys.stdout

2010-12-17 Thread R. David Murray

R. David Murray rdmur...@bitdance.com added the comment:

I think this is a documentation bug, since IMO help should print on stdout, not 
stderr[1].  I would expect print_usage to do likewise, but for the error to 
tell print_usage to write to stderr when it calls it...which is exactly what 
the code does.

[1] I know some unix commands print help to stderr, and this really annoys me 
when I pipe long help output to lessand it *still* scrolls off the screen.

--
assignee:  - d...@python
components: +Documentation -Library (Lib)
nosy: +bethard, d...@python, r.david.murray
stage:  - needs patch

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



[issue10728] argparse.ArgumentParser.print_help uses sys.stdout

2010-12-17 Thread R. David Murray

Changes by R. David Murray rdmur...@bitdance.com:


--
versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6

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