[New-bugs-announce] [issue4297] Add error_log attribute to optparse.OptionParser
Daniel Watkins
report at bugs.python.org
Tue Nov 11 15:22:59 CET 2008
New submission from Daniel Watkins <daniel at daniel-watkins.co.uk>:
I've recently had to subclass optparse.OptionParser, and copy-paste the
exit method, just to change where errors were printed to (I needed
stdout rather than stderr). I've also had a request from a client to
log errors with command-line parsing to a file, rather than to stdout.
So, this patch adds an error_log parameter to OptionParser.__init__
which is used instead of stderr internally (and, of course, defaults to
stderr).
----------
components: Library (Lib)
files: optparse-error_log.patch
keywords: patch
messages: 75741
nosy: odd_bloke
severity: normal
status: open
title: Add error_log attribute to optparse.OptionParser
type: feature request
versions: Python 2.7
Added file: http://bugs.python.org/file11985/optparse-error_log.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4297>
_______________________________________
More information about the New-bugs-announce
mailing list