> No, that affects the string printed only *after* the "usage = " string.
>  What I would like to do is insert some string *before* the "usage = "
> string, which is right after the command I type at the command prompt.
> So I would like to make it look like this:

The example was fine (except for a typo) as far as demonstrating the
concept.  Try this corrected version:

from optparse import OptionParser

usage = '************ THIS IS NEWLY INSERTED STRING
************\nusage: %prog [options] input_file'
parser = OptionParser(usage=usage)
parser.print_help()

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to