From 59ba6a394b9abac143ddc94f072a5bffa8ae98d8 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Fri, 17 Jun 2005 20:22:54 +0000 Subject: [PATCH] Send GtkDeprecationWarnings to stdout, not stderr, so only developers will see them (Thomas Leonard). git-svn-id: https://rox.svn.sourceforge.net/svnroot/rox/trunk/ROX-Lib2@3975 66de3db3-b00d-0410-b41b-f4738ad19bea --- Help/Changes | 5 +++++ python/rox/__init__.py | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/Help/Changes b/Help/Changes index 402dce3..aaa6f28 100644 --- a/Help/Changes +++ b/Help/Changes @@ -3,6 +3,11 @@ by Thomas Leonard http://rox.sourceforge.net +17-Jun-2005 +~~~~~~~~~~~ +Send GtkDeprecationWarnings to stdout, not stderr, so only developers will +see them (Thomas Leonard). + 10-Jun-2005 ~~~~~~~~~~~ Fixed deprecation warning in processes.py (Thomas Leonard). diff --git a/python/rox/__init__.py b/python/rox/__init__.py index de1c188..19d824a 100644 --- a/python/rox/__init__.py +++ b/python/rox/__init__.py @@ -93,6 +93,14 @@ def _warn_old_findrox(): "old and may cause problems." % app_dir _warn_old_findrox() +import warnings as _warnings +def _stdout_warn(message, category, filename, lineno, file = None, + showwarning = _warnings.showwarning): + if file is None and issubclass(category, g.DeprecationWarning): + file = sys.stdout + showwarning(message, category, filename, lineno, file) +_warnings.showwarning = _stdout_warn + # For backwards compatibility. Use True and False in new code. TRUE = True FALSE = False -- 2.11.4.GIT