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 and
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 your
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 passed to option
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 python
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
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 do not get
Max Erickson wrote:
Andrew Robert [EMAIL PROTECTED] wrote in
news:[EMAIL PROTECTED]:
snip
\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 tried
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
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:],