Пример #1
0
    def button_fmake(event):
# Функция для кнопки генерации. Записывается с аргументом события.
        dict_val = {
        "str_langu": Settingz["str_langu"],
        "str_minim": sizer_mini.GetValue(),
        "str_maxim": sizer_maxi.GetValue(),
        "str_quant": sizer_n.GetValue(),
        "str_avera": sizer_mean.GetValue(),
        "str_rsd_p": sizer_rsd.GetValue(),
        "str_round": sizer_round.GetValue(),
        "log_punct": check_punctu.IsChecked(),
        "log_verbo": check_verbosity.IsChecked(),
        "log_algor": check_algorithm.IsChecked(),
        "log_min_v": sizer_mini.GetCurrentSelection(),
        "log_max_v": sizer_maxi.GetCurrentSelection(),
        "log_rsd_a": check_rsd_a.IsChecked(),
        "log_rsd_w": sizer_rsd.GetCurrentSelection(),
        "log_horiz": check_horizontal_output.IsChecked(),
        "str_sortm": sizer_sortm.GetValue()}
# Here it is a dictionary with almost all output values.
        dict_out = randorator(dict_val)
# The output dictionary is transfered to the external function to get text back.
        text_out.SetValue(dict_out["str_infoz"] + dict_out["str_numbz"])
# Запись текста в поле.
        if check_copy.IsChecked():
            if wx.TheClipboard.Open():
                wx.TheClipboard.SetData(wx.TextDataObject(dict_out["str_numbz"]))
                wx.TheClipboard.Close()
Пример #2
0
    def button_fmake():
#Функция для кнопки. Записывается без аргументов!
        text_out.delete(1.0, END)
#Очистка текстового поля.
        dict_val = {
        "str_langu": Settingz["str_langu"],
        "str_minim": entry_mini.get(),
        "str_maxim": entry_maxi.get(),
        "str_quant": entry_n.get(),
        "str_avera": entry_mean.get(),
        "str_rsd_p": entry_rsd.get(),
        "str_round": entry_round.get(),
        "log_punct": vcheck_punctuation.get(),
        "log_verbo": vcheck_verbosity.get(),
        "log_algor": vcheck_algorithm.get(),
        "log_min_v": entry_mini.getbox(),
        "log_max_v": entry_maxi.getbox(),
        "log_rsd_a": vcheck_rsd_a.get(),
        "log_rsd_w": entry_rsd.getbox(),
        "log_horiz": vcheck_horizontal_output.get(),
        "str_sortm": entry_sortm.get()}
# Here it is a dictionary with almost all output values.
        dict_out = randorator(dict_val)
# The output dictionary is transfered to the external function to get text back.
        text_out.insert(END, dict_out["str_infoz"] + dict_out["str_numbz"])
# The text is put into the field.
        if vcheck_copy.get():
            root.clipboard_clear()
            root.clipboard_append(dict_out["str_numbz"])
Пример #3
0
def test_rando(dict_in):
    dict_out = randorator(dict_in)
    print(dict_out["str_infoz"] + dict_out["str_numbz"])