(mapdict, script=False)
return _flatten(opts)
Formats mapdict to pass it to tk.call.

    E.g. (script=False):
      {'expand': [('active', 'selected', 'grey'), ('focus', [1, 2, 3, 4])]}

      returns:

      ('-expand', '{active selected} grey focus {1, 2, 3, 4}')
Formats mapdict to pass it to tk.call.
Formats mapdict to pass it to tk . call .
def _format_mapdict(mapdict, script=False):
    """Formats mapdict to pass it to tk.call.

    E.g. (script=False):
      {'expand': [('active', 'selected', 'grey'), ('focus', [1, 2, 3, 4])]}

      returns:

      ('-expand', '{active selected} grey focus {1, 2, 3, 4}')"""

    opts = []
    for opt, value in mapdict.items():
        opts.extend(("-%s" % opt,
                     _format_optvalue(_mapdict_values(value), script)))

    return _flatten(opts)
def _format_mapdict ( mapdict , script = False ) : opts = [ ] for opt , value in mapdict . items ( ) : opts . extend ( ( "-%s" % opt , _format_optvalue ( _mapdict_values ( value ) , script ) ) ) return _flatten ( opts )