New submission from Daniel Watkins <[EMAIL PROTECTED]>: 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 <[EMAIL PROTECTED]> <http://bugs.python.org/issue4297> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com