> > How can I access the top level module's doc string from toolkit?
>
> Like
>
> import __main__
> print_usage( __main__ )
>
> with suitable definition of 'usage'.
>
> Cheers & hth.,
>
> - Alf
Problem solved!
Thanks for the other tips too.
--
http://mail.python.org/mailman/listinfo/pyt
* David:
I have a module toolkit.py with some functions I use often. One of
these functions displays a usage message (__doc__).
def usage(messages=[], exit=-1):
"""Print the doc string as wells as any useful messages."""
print(__doc__)
for message in messages:
print("\033[91