Description: pydoc: use the pager command if available
 Debian file pagers register the "pager" alternative, so if any pager is
 available, /usr/bin/pager will exist, and point to the best pager available.

Forwarded: no

--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1578,6 +1578,8 @@ def getpager():
         return plainpager
     if sys.platform == 'win32':
         return lambda text: tempfilepager(plain(text), 'more <')
+    if hasattr(os, 'system') and os.system('(pager) 2>/dev/null') == 0:
+        return lambda text: pipepager(text, 'pager')
     if hasattr(os, 'system') and os.system('(less) 2>/dev/null') == 0:
         return lambda text: pipepager(text, 'less')
 
