On Feb 11, 4:36 pm, Matthew Sacks <ntw...@gmail.com> wrote: > The documentation leaves lack for want, especially the examples.
You had two problems: (1) str(passedArgs): The docs make it plain that "args" is a list, not a str instance: """args is the argument list to be parsed, without the leading reference to the running program. Typically, this means sys.argv[1:]""". The 1st and 2nd examples spell out the same story; here's the 2nd: """ Using long option names is equally easy: >>> s = '--condition=foo --testing --output-file abc.def -x a1 a2' >>> args = s.split() >>> args ['--condition=foo', '--testing', '--output-file', 'abc.def', '-x', 'a1', 'a2'] """ (2) omitting the *required* options arg: (a) it's not wrapped in [] so it's required (b) the docs say """To accept only long options, options should be an empty string.""" IOW, it may "leave lack for want", but not in the areas causing you a bother. -- http://mail.python.org/mailman/listinfo/python-list