> But I find it dumb to encode and decode a dictionary... So I would > like to know how I if there is a good way of passing a dictionary to > optparse and benefiting from its option management (check, error > detection, etc). I don't think you can get away from encoding/decoding the option dictionary. You can merge the options from the command line though. options = {"a" : 1, "b" : 2} opts, args = parser.parse_args() options.update(opts.__dict__)
HTH -- Miki Tebeka <miki.teb...@gmail.com> http://pythonwise.blogspot.com -- http://mail.python.org/mailman/listinfo/python-list