[EMAIL PROTECTED] wrote:
Hello,
I have the following commands:
testb -s
testb -s -o
testb -s -o
How do i split the commands so that all three are valid. And how do i
check for missing arguments?
Use optparse. It's an improvement over the old getopt that makes
writing option parsers easy:
[EMAIL PROTECTED] wrote:
Hello,
I have the following commands:
testb -s
testb -s -o
testb -s -o
How do i split the commands so that all three are valid. And how do i
check for missing arguments?
Thanks,
-Joe
Look into the getopt module. It vastly simplifies parsing command line
arguments. F