def _format_optdict(optdict, script=False, ignore=None):

    opts = []
    for opt, value in optdict.iteritems():
        if not ignore or opt not in ignore:
            opts.append("-%s" % opt)
            if value is not None:
                opts.append(_format_optvalue(value, script))

    return _flatten(opts)
Formats optdict to a tuple to pass it to tk.call.
dataset/ETHPy150Open francelabs/datafari/windows/python/Lib/lib-tk/ttk.py/_format_optdict