Re: [Tutor] To print docstrings

2008-12-04 Thread Alan Gauld
"prasad rao" <[EMAIL PROTECTED]> wrote Please someone tell me how I can retrive all the docstrings in a module Unless its just as an exercise use help() Its much easier! -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld _

Re: [Tutor] To print docstrings

2008-12-04 Thread Kent Johnson
On Thu, Dec 4, 2008 at 10:10 AM, A.T.Hofkamp <[EMAIL PROTECTED]> wrote: > docs = [] > for x in dir(collections): > docs.append(x.__doc__) This will not work, see my previous email for solution. Kent ___ Tutor maillist - Tutor@python.org http://mail

Re: [Tutor] To print docstrings

2008-12-04 Thread Kent Johnson
On Thu, Dec 4, 2008 at 9:46 AM, prasad rao <[EMAIL PROTECTED]> wrote: > > Hello friends. > I am new to programing.I am learning Python. > I failed in my attempts to retrive doc strings of methods in > a module. > """ > for x in dir(logging): > print x,x.__doc__ Here x is a string, that is why y

Re: [Tutor] To print docstrings

2008-12-04 Thread A.T.Hofkamp
prasad rao wrote: Hello friends. I am new to programing.I am learning Python. I failed in my attempts to retrive doc strings of methods in a module. """ for x in dir(logging): print x,x.__doc__ = for x in dir(collections): print x,collections.x.__doc__ == I am n