Re: Quick Reference from module doc strings.

2005-05-17 Thread Ron Adam
Michele Simionato wrote: > Ron Adam: > >>Thats part of what I'm trying to resolve, the doc strings a lot of > > time > >>isn't enough by itself or is missing. So I'm trying to build up a >>complete enough record so if there is no doc string, at least some > > sense > >>of what it is can be fig

Re: Quick Reference from module doc strings.

2005-05-17 Thread Michele Simionato
These days I use generators instead of StringIO, i.e. instead of print >> out, mystring I just write yield mystring and then I "".join the generator. Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list

Re: Quick Reference from module doc strings.

2005-05-17 Thread Michele Simionato
Ron Adam: > Thats part of what I'm trying to resolve, the doc strings a lot of time > isn't enough by itself or is missing. So I'm trying to build up a > complete enough record so if there is no doc string, at least some sense > of what it is can be figured out without a lot browsing or looking at

Re: Quick Reference from module doc strings.

2005-05-17 Thread Ron Adam
Scott David Daniels wrote: > Ron Adam wrote: > >> ...What would be the advantage of using StringIO over list.append with >> ''.join()? > > The advantage is more in using a function that prints as it goes > rather than building up a large string to print. I would call the > print function at the

Re: Quick Reference from module doc strings.

2005-05-17 Thread Scott David Daniels
Ron Adam wrote: > ...What would be the advantage of using StringIO over list.append with > ''.join()? The advantage is more in using a function that prints as it goes rather than building up a large string to print. I would call the print function at the bottom (with None as the print destinatio

Re: Quick Reference from module doc strings.

2005-05-17 Thread Ron Adam
Michele Simionato wrote: > Ron Adam: > > >>Sound great! Adding a command line parser, I'm going to add a brief ^---^ That part should have been deleted, I meant your whole program sounded good, not just that part. :-) >>command line parser to it today

Re: Quick Reference from module doc strings.

2005-05-17 Thread Michele Simionato
Ron Adam: > Sound great! Adding a command line parser, I'm going to add a brief > command line parser to it today, but nothing as elaborate as you have > already. Could you post a part of the output as an example? How is the > index built? For the command line parser, see http://aspn.activesta

Re: Quick Reference from module doc strings.

2005-05-17 Thread Ron Adam
Michele Simionato wrote: >>Do you have any feature suggestions, additional information that > > could > >>go in, something that would extend the content in some way and make > > it > >>more useful? > > > I have written something similar which I use all the time. It generates > ReST > output w

Re: Quick Reference from module doc strings.

2005-05-17 Thread Michele Simionato
> Do you have any feature suggestions, additional information that could > go in, something that would extend the content in some way and make it > more useful? I have written something similar which I use all the time. It generates ReST output which I can browse with "less" from the command line,

Re: Quick Reference from module doc strings.

2005-05-16 Thread Ron Adam
Scott David Daniels wrote: > Ron Adam wrote: > >>Do you have any feature suggestions, additional information that could >>go in, something that would extend the content in some way and make it >>more useful? >> >>As it stands now, it could be just a module, so you could... >> > > The style is s

Re: Quick Reference from module doc strings.

2005-05-16 Thread Scott David Daniels
Ron Adam wrote: > Do you have any feature suggestions, additional information that could > go in, something that would extend the content in some way and make it > more useful? > > As it stands now, it could be just a module, so you could... > The style is still a sticking point for me -- too m

Re: Quick Reference from module doc strings.

2005-05-15 Thread Ron Adam
Scott David Daniels wrote: > Althought object is a horrible name for your own value (there is a builtin > object which you use for defining new-style classes), you probably want: Good point, I agree. It's a bad habit to start, sooner or later it would cause a problem. I'll find something else

Re: Quick Reference from module doc strings.

2005-05-15 Thread Scott David Daniels
Ron Adam wrote: > John Machin wrote: > >> Ron Adam wrote: >> >>> Does anyone have suggestions on how to improve this further? >> >> Not functionally (from me, yet). However if you can bear a stylistic >> comment, do read on :-) >> >>> elif (isinstance(object,str) >>> or isi

Re: Quick Reference from module doc strings.

2005-05-15 Thread Ron Adam
John Machin wrote: > Ron Adam wrote: > >>Does anyone have suggestions on how to improve this further? > > > Not functionally (from me, yet). However if you can bear a stylistic > comment, do read on :-) > > >> elif (isinstance(object,str) >> or isinstance(object,int) >>

Re: Quick Reference from module doc strings.

2005-05-15 Thread John Machin
Ron Adam wrote: > Does anyone have suggestions on how to improve this further? Not functionally (from me, yet). However if you can bear a stylistic comment, do read on :-) > elif (isinstance(object,str) > or isinstance(object,int) > or isinstance(object,

Re: Quick Reference from module doc strings.

2005-05-15 Thread Ron Adam
I think this deserves a little more of a description than I gave it initially. The routine in the previous message does a little more than just print out __doc__ strings. It outputs a formatted alphabetical list of objects in a module with each objects, name, class or type, and then tries to