为什么Gooey复选框功能对用户输入没有反应?

时间:2019-08-06 13:40:15

标签: python user-interface

我正在基于Gooey构建GUI,我想添加一个复选框并将值存储为True / False,但出现错误:

IndexError: list index out of range

这是我用于复选框的代码:

import pandas as pd
from gooey import Gooey, GooeyParser

@Gooey(program_name="DEPRECIATION",navigation='TABBED', header_bg_color = '#6aa2fc',default_size=(710, 700))
def parse_args():
    parser = GooeyParser()

    parser.add_argument('Useful_Life',
                        widget='CheckBox',
                        default = False,
                        action = "store_true",
                        help='Calculate depreciation based on Useful years')
    args = parser.parse_args()
    return args

if __name__ == '__main__':
    args = parse_args()
    switch1 = args.Useful_Life
    print(switch1)

我想念什么吗?

参考:https://github.com/chriskiehl/Gooey/issues/148

0 个答案:

没有答案