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, as
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 which I can
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
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, but
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
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 bottom
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
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
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 figured out
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 many
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 still a sticking
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
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
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)
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 isinstance(object,int)
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
Does anyone have suggestions on how to improve this further?
Cheers,
Ron_Adam
def getobjs(object, dlist=[], lvl=0, maxlevel=1):
Retrieve a list of sub objects from an object.
if object not in dlist:
dlist.append(object)
if lvlmaxlevel:
dobj =
17 matches
Mail list logo