[Patches] [ python-Patches-612111 ] quietly select between 'less' and 'more'

noreply@sourceforge.net noreply@sourceforge.net
Tue, 24 Sep 2002 11:36:49 -0700


Patches item #612111, was opened at 2002-09-20 15:24
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=612111&group_id=5470

Category: Library (Lib)
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Neal Norwitz (nnorwitz)
Summary: quietly select between 'less' and 'more'

Initial Comment:
On Unixoid systems without the 'less' command, executing 
'pydoc.help(mod)' emits:

    sh: less: not found

which is annoying.  The attached patch gets it to quietly look for 'less' 
and 'more'.  I don't know if the locateexe() function is entirely correct 
(especially considering Windows) or if there are other pagers available.

backport candidate?  I know this behavior exists in 2.1.3 and 2.2.1.  
Dunno if it's more than a wart though.



----------------------------------------------------------------------

Comment By: Gerhard Häring (ghaering)
Date: 2002-09-24 20:36

Message:
Logged In: YES 
user_id=163326

It should also honour the PAGER environment variable, and
use it if available. I'm trying to be puristic for a minute:
we probably shouldn't support any nonstandard pagers like
less, view, most, etc. at all. That's what Unix has the
PAGER environment variable for, just like the EDITOR and
VISUAL ones. I'm certainly no puristic Unix user, but we
already have zillions of patches for the webbrowser module
to support the various Unix Web Browsers out there. We
should avoid to get into the same situation with pydoc.

----------------------------------------------------------------------

Comment By: Gerhard Häring (ghaering)
Date: 2002-09-24 20:36

Message:
Logged In: YES 
user_id=163326

It should also honour the PAGER environment variable, and
use it if available. I'm trying to be puristic for a minute:
we probably shouldn't support any nonstandard pagers like
less, view, most, etc. at all. That's what Unix has the
PAGER environment variable for, just like the EDITOR and
VISUAL ones. I'm certainly no puristic Unix user, but we
already have zillions of patches for the webbrowser module
to support the various Unix Web Browsers out there. We
should avoid to get into the same situation with pydoc.

----------------------------------------------------------------------

Comment By: Thomas Heller (theller)
Date: 2002-09-20 15:54

Message:
Logged In: YES 
user_id=11105

locateexe does not work on Windows (for several reasons).
Dunno if people install other pagers - I certainly don't.
And when they do, are they really named 'less'?

OTOH, more is in the PATH on every windows system, so I
would suggest simply call more on Windows.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=612111&group_id=5470