Re: optional arguments with compact reporting in optparse

2007-11-12 Thread Steven Bethard
braver wrote: > Steve -- thanks for your pointer to argparse, awesome progress -- > optional arguments. > > However, I still wonder how I do reporting. The idea is that there > should be a list with tuples of the form: > > (short, long, value, help) > > -- for all options, regardless of whether

Re: optional arguments with compact reporting in optparse

2007-11-12 Thread braver
Steve -- thanks for your pointer to argparse, awesome progress -- optional arguments. However, I still wonder how I do reporting. The idea is that there should be a list with tuples of the form: (short, long, value, help) -- for all options, regardless of whether they were specified on the comm

Re: optional arguments with compact reporting in optparse

2007-11-08 Thread Steven Bethard
braver wrote: > Posted to the Optik list, but it seems defunct. Optik is now Python's > optparse. > > I wonder how do you implement optional arguments to Optik. You may want to check out argparse: http://argparse.python-hosting.com/ It supports optional arguments like this:: parser

optional arguments with compact reporting in optparse

2007-11-08 Thread braver
Posted to the Optik list, but it seems defunct. Optik is now Python's optparse. I wonder how do you implement optional arguments to Optik. I.e., you can have an option -P [file] -- the filename is optional, with a default "data,pikl". It works as follows: -- if no -P is given, no pickle is w