def body(self, master):
        title = _("Choose output format and destination file")
        question = _("Output format:\n")
        top_frame = Frame(master)
        top_frame.pack(side=TOP, padx=5, pady=5)

        control_panel0 = Frame(master)
        control_panel0.pack(side=TOP,
                            expand=YES,
                            anchor=S,
                            fill=Y,
                            padx=5,
                            pady=5)
        bottom_frame = Frame(master)
        bottom_frame.pack(side=TOP, anchor=S)

        Label(top_frame, bitmap="question").pack(side=TOP, anchor=N)
        Label(top_frame, text=title).pack(side=TOP, anchor=N)
        output_frame = Frame(control_panel0, relief=RIDGE, bd=1)
        input_frame = Frame(control_panel0, relief=RIDGE, bd=1)
        input_frame.pack(side=TOP)
        output_frame.pack(side=TOP)

        params = "%s\n" % self.data

        Label(input_frame, text=_('Input format'), width=20).pack(side=LEFT)

        self.input_format = StringVar()
        self.input_format.set(self.format)
        input_format_entry = Menubutton(input_frame,
                                        text=_("choose a format"),
                                        textvariable=self.input_format,
                                        relief=RAISED,
                                        width=24)
        input_format_entry.menu = Menu(input_format_entry, tearoff=0)
        input_format_entry["menu"] = input_format_entry.menu

        for k, v in sorted(BUILTIN_INPUT_FORMATS.items()):
            input_format_entry.menu.add_radiobutton(label=v[2],
                                                    variable=self.input_format,
                                                    value=k)
        input_format_entry.pack(side=LEFT, anchor=W)

        Label(output_frame, text=_('Output format'), width=20).pack(side=LEFT)

        self.output_format = StringVar()
        self.output_format.set(self.format)
        output_format_entry = Menubutton(output_frame,
                                         text=_("choose a format"),
                                         textvariable=self.output_format,
                                         relief=RAISED,
                                         width=24)
        output_format_entry.menu = Menu(output_format_entry, tearoff=0)
        output_format_entry["menu"] = output_format_entry.menu

        for k, v in sorted(BUILTIN_OUTPUT_FORMATS.items()):
            output_format_entry.menu.add_radiobutton(
                label=v[2], variable=self.output_format, value=k)
        output_format_entry.pack(side=LEFT, anchor=W)
def list_formats():
    '''Print a list of the supported input and output formats.'''

    from totalopenstation.formats import BUILTIN_INPUT_FORMATS

    mod_string = "List of supported input formats:\n" + "-" * 30 + "\n"
    for k, v in sorted(BUILTIN_INPUT_FORMATS.items()):
        mod_string += k.ljust(20) + v[2] + "\n"
    mod_string += "\n\n"

    mod_string += "List of supported output formats:\n" + "-" * 30 + "\n"
    for k, v in sorted(BUILTIN_OUTPUT_FORMATS.items()):
        mod_string += k.ljust(20) + v[2] + "\n"
    mod_string += "\n"
    return mod_string
def list_formats():
    '''Print a list of the supported input and output formats.'''

    from totalopenstation.formats import BUILTIN_INPUT_FORMATS

    mod_string = "List of supported input formats:\n" + "-" * 30 + "\n"
    for k, v in sorted(BUILTIN_INPUT_FORMATS.items()):
        mod_string += k.ljust(20) + v[2] + "\n"
    mod_string += "\n\n"

    mod_string += "List of supported output formats:\n" + "-" * 30 + "\n"
    for k, v in sorted(BUILTIN_OUTPUT_FORMATS.items()):
        mod_string += k.ljust(20) + v[2] + "\n"
    mod_string += "\n"
    return mod_string
    def body(self, master):
        title = _("Choose output format and destination file")
        question = _("Output format:\n")
        top_frame = Frame(master)
        top_frame.pack(side=TOP, padx=5, pady=5)

        control_panel0 = Frame(master)
        control_panel0.pack(
            side=TOP,
            expand=YES,
            anchor=S,
            fill=Y, padx=5, pady=5)
        bottom_frame = Frame(master)
        bottom_frame.pack(side=TOP, anchor=S)

        Label(top_frame, bitmap="question").pack(side=TOP, anchor=N)
        Label(top_frame, text=title).pack(side=TOP, anchor=N)
        output_frame = Frame(control_panel0, relief=RIDGE, bd=1)
        input_frame = Frame(control_panel0, relief=RIDGE, bd=1)
        input_frame.pack(side=TOP)
        output_frame.pack(side=TOP)

        params = "%s\n" % self.data

        Label(input_frame, text=_('Input format'), width=20).pack(side=LEFT)

        self.input_format = StringVar()
        self.input_format.set(self.format)
        input_format_entry = Menubutton(input_frame,
                                        text=_("choose a format"),
                                        textvariable=self.input_format,
                                        relief=RAISED,
                                        width=24)
        input_format_entry.menu = Menu(input_format_entry, tearoff=0)
        input_format_entry["menu"] = input_format_entry.menu

        for k, v in sorted(BUILTIN_INPUT_FORMATS.items()):
            input_format_entry.menu.add_radiobutton(
                label=v[2],
                variable=self.input_format,
                value=k)
        input_format_entry.pack(side=LEFT, anchor=W)

        Label(output_frame, text=_('Output format'), width=20).pack(side=LEFT)

        self.output_format = StringVar()
        self.output_format.set(self.format)
        output_format_entry = Menubutton(output_frame,
                                        text=_("choose a format"),
                                        textvariable=self.output_format,
                                        relief=RAISED,
                                        width=24)
        output_format_entry.menu = Menu(output_format_entry, tearoff=0)
        output_format_entry["menu"] = output_format_entry.menu

        for k, v in sorted(BUILTIN_OUTPUT_FORMATS.items()):
            output_format_entry.menu.add_radiobutton(
                label=v[2],
                variable=self.output_format,
                value=k)
        output_format_entry.pack(side=LEFT, anchor=W)