[Python-checkins] python/dist/src/Lib pydoc.py,1.69,1.70

montanaro@users.sourceforge.net montanaro@users.sourceforge.net
Thu, 26 Sep 2002 14:45:00 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv6050

Modified Files:
	pydoc.py 
Log Message:
try executing 'less' in a parenthesized subshell - prevents systems like
Solaris from squawking if less isn't available.  See
http://python.org/sf/612111 for details.



Index: pydoc.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pydoc.py,v
retrieving revision 1.69
retrieving revision 1.70
diff -C2 -d -r1.69 -r1.70
*** pydoc.py	23 Aug 2002 08:40:42 -0000	1.69
--- pydoc.py	26 Sep 2002 21:44:57 -0000	1.70
***************
*** 1200,1204 ****
      if sys.platform == 'win32' or sys.platform.startswith('os2'):
          return lambda text: tempfilepager(plain(text), 'more <')
!     if hasattr(os, 'system') and os.system('less 2>/dev/null') == 0:
          return lambda text: pipepager(text, 'less')
  
--- 1200,1204 ----
      if sys.platform == 'win32' or sys.platform.startswith('os2'):
          return lambda text: tempfilepager(plain(text), 'more <')
!     if hasattr(os, 'system') and os.system('(less) 2>/dev/null') == 0:
          return lambda text: pipepager(text, 'less')