I'm a python newbie, and I'm trying to use "getopt" to process command line arguments. I'd like to be able to specify a command line option that *could* have an associated argument, but getopt is forcing me to declare each option to be
*either*
1. with an associated argument
*or*
2. without an associated argument
and there doesn't seem to be any in-between. Is there a way to use getopt in such a way as to allow me to specify an option to *either* have an associated argument, or not? For example, if I have option "--abc", then I want to be able to specify "--abc" either with an argument(--abc="def", or without an argument(--abc), and have both be legal in terms of getopt. Is this possible?
TIA. Hardy Merrill
*either*
1. with an associated argument
*or*
2. without an associated argument
and there doesn't seem to be any in-between. Is there a way to use getopt in such a way as to allow me to specify an option to *either* have an associated argument, or not? For example, if I have option "--abc", then I want to be able to specify "--abc" either with an argument(--abc="def", or without an argument(--abc), and have both be legal in terms of getopt. Is this possible?
TIA. Hardy Merrill