IDLE Namespace Toolbox? Windows.

alex23 wuwei23 at gmail.com
Sun Jan 17 23:40:41 EST 2010


On Jan 18, 8:22 am, "W. eWatson" <wolftra... at invalid.com> wrote:
> I've found it a bit aggravating that using dir and
> help, for example, that the output just rolls on off the screen and I
> have to play around with the shell scroll bars to find what I'm looking
> for. A few simple changes to mydir should change that, but I would hope
> or think maybe there are even more tools to generally help.

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 :)



More information about the Python-list mailing list