def __init__(self, json_str, runner, master=None):
    j = json.loads(json_str)
    self.name = j['name']
    self.description = j['description']
    self.flag = j['flags'][(len(j['flags']) - 1)]
    self.parameter_type = j['parameter_type']
    self.file_type = j['parameter_type']['ExistingFileOrFloat']
    self.optional = j['optional']
    default_value = j['default_value']
    self.runner = runner
    ttk.Frame.__init__(self, master)
    self.grid()
    self['padding'] = '0.02i'
    self.label = ttk.Label(self, text=self.name, justify=tk.LEFT)
    self.label.grid(row=0, column=0, sticky=tk.W)
    self.label.columnconfigure(0, weight=1)
    if (not self.optional):
        self.label['text'] = (self.label['text'] + '*')
    fs_frame = ttk.Frame(self, padding='0.0i')
    self.value = tk.StringVar()
    self.entry = ttk.Entry(fs_frame, width=35, justify=tk.LEFT, textvariable=self.value)
    self.entry.grid(row=0, column=0, sticky=tk.NSEW)
    self.entry.columnconfigure(0, weight=1)
    if default_value:
        self.value.set(default_value)
    self.open_button = ttk.Button(fs_frame, width=4, text='...', command=self.select_file)
    self.open_button.grid(row=0, column=1, sticky=tk.E)
    self.label = ttk.Label(fs_frame, text='OR', justify=tk.LEFT)
    self.label.grid(row=0, column=2, sticky=tk.W)
    self.value2 = tk.StringVar()
    self.entry2 = ttk.Entry(fs_frame, width=10, justify=tk.LEFT, textvariable=self.value2)
    self.entry2.grid(row=0, column=3, sticky=tk.NSEW)
    self.entry2.columnconfigure(0, weight=1)
    self.entry2['justify'] = 'right'
    fs_frame.grid(row=1, column=0, sticky=tk.NSEW)
    fs_frame.columnconfigure(0, weight=10)
    fs_frame.columnconfigure(1, weight=1)
    self.columnconfigure(0, weight=1)
    self.rowconfigure(0, weight=1)
    self.rowconfigure(1, weight=1)
    if (_platform == 'darwin'):
        self.entry.bind('<Command-Key-a>', self.select_all)
    else:
        self.entry.bind('<Control-Key-a>', self.select_all)
def __init__(self, json_str, runner, master=None):
    j = json.loads(json_str)
    self.name = j['name']
    self.description = j['description']
    self.flag = j['flags'][(len(j['flags']) - 1)]
    self.parameter_type = j['parameter_type']
    self.file_type = j['parameter_type']['ExistingFileOrFloat']
    self.optional = j['optional']
    default_value = j['default_value']
    self.runner = runner
    ttk.Frame.__init__(self, master)
    self.grid()
    self['padding'] = '0.02i'
    self.label = ttk.Label(self, text=self.name, justify=tk.LEFT)
    self.label.grid(row=0, column=0, sticky=tk.W)
    self.label.columnconfigure(0, weight=1)
    if (not self.optional):
        self.label['text'] = (self.label['text'] + '*')
    fs_frame = ttk.Frame(self, padding='0.0i')
    self.value = tk.StringVar()
    self.entry = ttk.Entry(fs_frame, width=35, justify=tk.LEFT, textvariable=self.value)
    self.entry.grid(row=0, column=0, sticky=tk.NSEW)
    self.entry.columnconfigure(0, weight=1)
    if default_value:
        self.value.set(default_value)
    self.open_button = ttk.Button(fs_frame, width=4, text='...', command=self.select_file)
    self.open_button.grid(row=0, column=1, sticky=tk.E)
    self.label = ttk.Label(fs_frame, text='OR', justify=tk.LEFT)
    self.label.grid(row=0, column=2, sticky=tk.W)
    self.value2 = tk.StringVar()
    self.entry2 = ttk.Entry(fs_frame, width=10, justify=tk.LEFT, textvariable=self.value2)
    self.entry2.grid(row=0, column=3, sticky=tk.NSEW)
    self.entry2.columnconfigure(0, weight=1)
    self.entry2['justify'] = 'right'
    fs_frame.grid(row=1, column=0, sticky=tk.NSEW)
    fs_frame.columnconfigure(0, weight=10)
    fs_frame.columnconfigure(1, weight=1)
    self.columnconfigure(0, weight=1)
    self.rowconfigure(0, weight=1)
    self.rowconfigure(1, weight=1)
    if (_platform == 'darwin'):
        self.entry.bind('<Command-Key-a>', self.select_all)
    else:
        self.entry.bind('<Control-Key-a>', self.select_all)