diff -r 74d3dc78f0db Lib/pydoc.py --- a/Lib/pydoc.py Mon Mar 21 13:26:24 2011 +0100 +++ b/Lib/pydoc.py Tue Mar 29 14:22:39 2011 +0200 @@ -1347,6 +1347,8 @@ def getpager(): """Decide what method to use for paging through text.""" + if not hasattr(sys.stdin, "isatty"): + return plainpager if not hasattr(sys.stdout, "isatty"): return plainpager if not sys.stdin.isatty() or not sys.stdout.isatty():