Re: showing help(M) when running module M standalone

2005-07-30 Thread Dan Sommers
On Sat, 30 Jul 2005 22:02:49 +0200, Chris <[EMAIL PROTECTED]> wrote: > I tried that, problem is that __all__ containts strings... Okay, that's twice I've lept before I looked. How about this: for a in __all__: print globals()[a].__doc__ HTH, Dan -- Dan Sommers

Re: showing help(M) when running module M standalone

2005-07-30 Thread Dan Sommers
On Sat, 30 Jul 2005 22:02:49 +0200, Chris <[EMAIL PROTECTED]> wrote: > I tried that, problem is that __all__ containts strings... Oops. I should have looked before I lept. Sorry, Dan -- Dan Sommers -- http://mail.python.org/mailman/listinfo/python-list

Re: showing help(M) when running module M standalone

2005-07-30 Thread Chris
hello, thanks for all suggestions, if __name__ == '__main__': __name__ = 'MODULENAME' help(__name__) does actually work any even shows the modulename it should. chris -- http://mail.python.org/mailman/listinfo/python-list

Re: showing help(M) when running module M standalone

2005-07-30 Thread Chris
Dan Sommers wrote: > On Sat, 30 Jul 2005 17:04:50 +0200, > Chris <[EMAIL PROTECTED]> wrote: > > >>hello, >>I have a small module which only contains some utility functions. when >>running this standalone I would like to show the module docs and each >>function docs, as if doing > > >> impo

Re: showing help(M) when running module M standalone

2005-07-30 Thread Thomas Heller
Chris <[EMAIL PROTECTED]> writes: > hello, > I have a small module which only contains some utility functions. when > running this standalone I would like to show the module docs and each > function docs, as if doing > > import M > help(M) > > I came up with the following but I reckon

Re: showing help(M) when running module M standalone

2005-07-30 Thread tiissa
Chris wrote: > hello, > I have a small module which only contains some utility functions. when > running this standalone I would like to show the module docs and each > function docs, as if doing > > import M > help(M) > > I came up with the following but I reckon there is a much simple

Re: showing help(M) when running module M standalone

2005-07-30 Thread Dan Sommers
On Sat, 30 Jul 2005 17:04:50 +0200, Chris <[EMAIL PROTECTED]> wrote: > hello, > I have a small module which only contains some utility functions. when > running this standalone I would like to show the module docs and each > function docs, as if doing > import M > help(M) > I came up

showing help(M) when running module M standalone

2005-07-30 Thread Chris
hello, I have a small module which only contains some utility functions. when running this standalone I would like to show the module docs and each function docs, as if doing import M help(M) I came up with the following but I reckon there is a much simpler way? if __name__ ==