Re: Option parser question - reading options from file as well as command line

2006-05-22 Thread Tim N. van der Leeuw
Andrew Robert wrote: > Hi Everyone. > > > I tried the following to get input into optionparser from either a file > or command line. > > Hi Andrew, I played around a bit more, not happy that the read_file method which I discovered earlier on the Values - object takes a property-file like input an

Re: Option parser question - reading options from file as well as command line

2006-05-17 Thread Tim N. van der Leeuw
Andrew Robert wrote: > Tim N. van der Leeuw wrote: > > Andrew Robert wrote: [...] > Hi Tim, > > I am using the pymqi module which is freely available at > http://pymqi.sourceforge.net/ . > > Documentation on the module can be found at > http://pymqi.sourceforge.net/pymqidoc.html . > > I have a few

Re: Option parser question - reading options from file as well as command line

2006-05-17 Thread Andrew Robert
Tim N. van der Leeuw wrote: > Andrew Robert wrote: >> Hi Everyone. >> >> >> I tried the following to get input into optionparser from either a file >> or command line. >> >> >> The code below detects the passed file argument and prints the file >> contents but the individual swithces do not get pas

Re: Option parser question - reading options from file as well as command line

2006-05-17 Thread Tim N. van der Leeuw
Andrew Robert wrote: > Hi Everyone. > > > I tried the following to get input into optionparser from either a file > or command line. > > > The code below detects the passed file argument and prints the file > contents but the individual swithces do not get passed to option parser. > After reading

Re: Option parser question - reading options from file as well as command line

2006-05-16 Thread Andrew Robert
Max Erickson wrote: > I don't know much about optparse, but since I was bored: > help(o.parse_args) > Help on method parse_args in module optparse: > > parse_args(self, args=None, values=None) method of > optparse.OptionParser instance > parse_args(args : [string] = sys.argv[1:], >

Re: Option parser question - reading options from file as well as command line

2006-05-16 Thread Max Erickson
Andrew Robert <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Any ideas? I don't know much about optparse, but since I was bored: >>> help(o.parse_args) Help on method parse_args in module optparse: parse_args(self, args=None, values=None) method of optparse.OptionParser instance p

Re: Option parser question - reading options from file as well as command line

2006-05-16 Thread Andrew Robert
Max Erickson wrote: > Andrew Robert <[EMAIL PROTECTED]> wrote in > news:[EMAIL PROTECTED]: > <\snip> > Check parser.usage, it is likely to look a lot like your infile. > > I'm not sure, but I think you need to pass your alternative arguments > to parser.parse_args. > > max > Hi Max, I tri

Re: Option parser question - reading options from file as well as command line

2006-05-16 Thread Max Erickson
Andrew Robert <[EMAIL PROTECTED]> wrote in news:[EMAIL PROTECTED]: > Hi Everyone. > > > I tried the following to get input into optionparser from either > a file or command line. > > > The code below detects the passed file argument and prints the > file contents but the individual swithces d

Option parser question - reading options from file as well as command line

2006-05-16 Thread Andrew Robert
Hi Everyone. I tried the following to get input into optionparser from either a file or command line. The code below detects the passed file argument and prints the file contents but the individual swithces do not get passed to option parser. Doing a test print of options.qmanager shows it una