Javadoc style python manual?
Michele Simionato
michele.simionato at gmail.com
Fri Sep 8 11:45:13 EDT 2006
Ben Sizer wrote:
> Michele Simionato wrote:
> > Ben Sizer wrote:
> > > I agree that the Python docs aren't quite as effective as reference
> > > material due to the lack of simple function and method lists though.
> >
> > http://docs.python.org/lib/modindex.html, pydoc and ipython are more
> > than enough for me.
>
> modindex is comprehensive but too 'flat'. Sometimes you want to see all
> of one object's methods and properties listed together.
>
> I was unaware of pydoc until this thread; its existence seems to be
> buried, somewhat. Looking at pydoc.org (assuming that is a good example
> of it in use), it looks more like what the original poster and I might
> want, but sadly it's still very inconsistent, with many things
> undescribed.
>
> --
> Ben Sizer
Don't miss IPython, too.
$ ipython
Python 2.4.1 (#2, Aug 25 2005, 18:20:57)
Type "copyright", "credits" or "license" for more information.
IPython 0.6.15 -- An enhanced Interactive Python.
? -> Introduction to IPython's features.
%magic -> Information about IPython's 'magic' % functions.
help -> Python's own help system.
object? -> Details about 'object'. ?object also works, ?? prints more.
In [1]: import email.FeedParser
In [2]: email.FeedParser.FeedParser?
Type: classobj
String Form: email.FeedParser.FeedParser
Namespace: Interactive
File: /usr/lib/python2.4/email/FeedParser.py
Docstring:
A feed-style parser of email.
Constructor information:
Definition: email.FeedParser.FeedParser(self, _factory=<class
email.Message.Message at 0xb77f5ddc>)
Docstring:
_factory is called with no arguments to create a new message obj
In [3]: help(email.FeedParser.FeedParser)
Help on class FeedParser in module email.FeedParser:
class FeedParser
| A feed-style parser of email.
|
| Methods defined here:
|
| __init__(self, _factory=<class email.Message.Message>)
| _factory is called with no arguments to create a new message
obj
|
| close(self)
| Parse all remaining data and return the root message object.
|
| feed(self, data)
| Push more data into the parser.
In [4]: email.FeedParser.FeedParser??
Type: classobj
String Form: email.FeedParser.FeedParser
Namespace: Interactive
File: /usr/lib/python2.4/email/FeedParser.py
Source:
class FeedParser:
"""A feed-style parser of email."""
def __init__(self, _factory=Message.Message):
"""_factory is called with no arguments to create a new message
obj"""
self._factory = _factory
self._input = BufferedSubFile()
self._msgstack = []
self._parse = self._parsegen().next
self._cur = None
...
Unfortunately, the nice colors of IPython are lost in the post :-(
Michele Simionato
More information about the Python-list
mailing list