Indeed; on *nix, when in the terminal, python invokes the pager[1]
(which splits text into pages and lets you move between them, hence
the name) for documentation that is longer than one screen. Apparently
there are pagers available for Windows, but I don't know whether
Python tries to use them or not.
Perhaps try installing one, setting the PAGER environment variable,
and see what happens when run python from the terminal and invoke
help()? And/or file a bug if Python indeed doesn't try to invoke a
pager on Windows.
Of course, this won't do anything about IDLE's shell, which isn't a
proper terminal.
Cheers,
Chris
--
http://blog.rebertia.com
[1]: http://en.wikipedia.org/wiki/Terminal_pager
(postscript got clipped off accidentally)
- Chris
on the command prompt:
cmd | more
works
--
John Bokma j3b
Hacking & Hiking in Mexico - http://johnbokma.com/
http://castleamber.com/ - Perl & Python Development
Er, that's supposed to be run in the terminal, not in IDLE. Presumably
you'd then run python.exe from the same terminal after issuing that
command.
He said "command prompt", not Python prompt.
If you haven't already, you really should check out IPython:
http://ipython.scipy.org
It's an enhanced interactive shell packed full of convenience
features. For example, output is by default paged, so you'll get the
behaviour you want from help() and dir() straight away. However,
you'll probably end up using IPython's help instead: <object>? will
not only display the docstring, it'll provide metadata about the
object, such as its base class, the file it was defined in and even
the namespace it exists in.
%page <object> will pretty print the object and run it through the
pager.
%timeit <statement|expression> is an _exceptionally_ handy wrapper
around the timeit module.
%bg <statement> runs in a separate, background thread
There's a directory stack, macros, code in history can be edited,
profiling & debugging, functions can be called without parenthesis
(nice if you use IPython as a shell replacement), and you can easily
capture the results of a command line call to a variable.
But yes, along with all that, it pages object printing :)