Re: problem with optparse

2008-12-02 Thread John Machin
On Dec 3, 11:47 am, Neal Becker <[EMAIL PROTECTED]> wrote: > Robert Kern wrote: > > Neal Becker wrote: > >> This example is right out of python library reference. What's wrong > >> here? > > >> import optparse > > >> def store_value(option, opt_str, value, parser): > >> setattr(parser.values,

Re: problem with optparse

2008-12-02 Thread Robert Kern
Neal Becker wrote: Robert Kern wrote: Neal Becker wrote: This example is right out of python library reference. What's wrong here? import optparse def store_value(option, opt_str, value, parser): setattr(parser.values, option.dest, value) parser = optparse.OptionParser() parser.add_opt

Re: problem with optparse

2008-12-02 Thread John Machin
On Dec 3, 11:28 am, Robert Kern <[EMAIL PROTECTED]> wrote: > Neal Becker wrote: > > This example is right out of python library reference.  What's wrong here? > > > import optparse > > > def store_value(option, opt_str, value, parser): > >     setattr(parser.values, option.dest, value) > > > parser

Re: problem with optparse

2008-12-02 Thread Neal Becker
Robert Kern wrote: > Neal Becker wrote: >> This example is right out of python library reference. What's wrong >> here? >> >> import optparse >> >> def store_value(option, opt_str, value, parser): >> setattr(parser.values, option.dest, value) >> >> parser = optparse.OptionParser() >> parse

Re: problem with optparse

2008-12-02 Thread Robert Kern
Neal Becker wrote: This example is right out of python library reference. What's wrong here? import optparse def store_value(option, opt_str, value, parser): setattr(parser.values, option.dest, value) parser = optparse.OptionParser() parser.add_option("--foo", action="ca

problem with optparse

2008-12-02 Thread Neal Becker
This example is right out of python library reference. What's wrong here? import optparse def store_value(option, opt_str, value, parser): setattr(parser.values, option.dest, value) parser = optparse.OptionParser() parser.add_option("--foo", action="callback", callback=sto