[optik] Long help lines and wrapping

Bob van der Poel <[email protected]> Sat, 09 Nov 2002 16:41:10 -0700
Newsgroups gmane.comp.python.optik.user
Message-ID <[email protected]>
I'm trying to use the Optik package for parsing command line options.
However, I'm running into a problem overriding its line warping
routines. I'd like the help to print something like:

        options:
          -p, --pattern   Set pattern. Available patterns are:
                  'xx'  use the xx pattern
                  'yy'  use the yy pattern
                  ... more list of pattern options
          -z, --zzzz  The Z option
          ... etc, etc

The problem comes when I create the help line for the -p option. I do
something like:

parser.add_option("-p", "--pattern", type="string", action="store",
dest="pattern", 
         help="Set Pattern. Available patterns are: ?? xx use the xx
pattern ?? yy use the yy pattern") 
               

In this example I've used '??' to indicate where I'd like the new lines
(with increased indentation) to start. Unfortunately, there is no ??
operator in Optik :)


Seems that optik thinks it knows better where the new lines should go.
Suggestions?

-- 
Bob van der Poel ** Wynndel, British Columbia, CANADA **
EMAIL: [email protected]
WWW:   http://www.kootenay.com/~bvdpoel



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf