novice20 17 Junior Poster

when the parser is populated with options using optparse,
in a case where an option say 'ip' is to be used twice, I get an OptionConflictError.


when the conflict handler was set to "resolve" as suggested in http://docs.python.org/library/optparse.html , it resolves the situation by removing '-ip' from the earlier options list of option strings.


I don't want this to happen. I want the option '-ip' to be used twice in my command line arguments.

how can this be acheived, without encountering OptionConflictError??

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.