Re: Formatting in PythonWin's Interactive Window
by James C. McDonald other posts by this author
Jan 12 2006 11:03AM messages near this date
view in the new Beta List Site
Re: Formatting in PythonWin's Interactive Window
|
RE: Formatting in PythonWin's Interactive Window
On Jan 12, 2006, at 12:00 PM, McNeill, David (GE Commercial Finance)
wrote:
> Hi,
>
> I've only been playing with PythonWin (and Python) for a day, but
> I'm very impressed, so far. One thing I can't figure out, though,
> is how to get the Interactive Window to format the output of some
> of the methods, such as __doc__. For instance, when I execute the line
>
> >>> dict.__doc__
>
> I get the following for output
>
> "dict() -> new empty dictionary.\ndict(mapping) -> new dictionary
> initialized from a mapping object's\n (key, value) pairs.\ndict
> (seq) -> new dictionary initialized as if via:\n d = {}\n for
> k, v in seq:\n d[k] = v\ndict(**kwargs) -> new dictionary
> initialized with the name=value pairs\n in the keyword argument
> list. For example: dict(one=1, two=2)"
>
> It's full of newline codes, but they are ignored, and they just
> make it harder to read. Is there a way to correct this?
>
> Thanks!
> Dave
>
Dave,
In an interactive window try,
> >> help(dict)
or
> >> help(help)
also checkout pydoc
http://www.python.org/doc/2.4.2/lib/module-pydoc.html
cheers,
Jim C. McDonald
_______________________________________________
ActivePython mailing list
ActivePython@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython
Thread:
David McNeill
Mark Pryor
James C. McDonald
David McNeill
|