def _format_mapdict(mapdict, script=False):
 opts = []
 for (opt, value) in mapdict.iteritems():
  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 . iteritems ( ) : opts . extend ( ( ( '-%s' % opt ) , _format_optvalue ( _mapdict_values ( value ) , script ) ) ) return _flatten ( opts )
formats mapdict to pass it to tk .