Пример #1
0
def test_runpymt(*largs, **kwargs):
    from pymt import runTouchApp, curry, getClock, stopTouchApp
    kwargs.setdefault('frame', 1)

    class testinfo(object):
        frame = kwargs.get('frame') + 1

    def test_runpymt_stop(info, *largs):
        info.frame -= 1
        if info.frame == 0:
            stopTouchApp()

    getClock().schedule_interval(curry(test_runpymt_stop, testinfo), 0)
    runTouchApp(*largs)
Пример #2
0
def test_runpymt(*largs, **kwargs):
    from pymt import runTouchApp, curry, getClock, stopTouchApp
    kwargs.setdefault('frame', 1)

    class testinfo(object):
        frame = kwargs.get('frame') + 1

    def test_runpymt_stop(info, *largs):
        info.frame -= 1
        if info.frame == 0:
            stopTouchApp()

    getClock().schedule_interval(curry(test_runpymt_stop, testinfo), 0)
    runTouchApp(*largs)
Пример #3
0
    e_input_list.selection_set(eval(c_input.get()).index(t))

    c_input_devicename.set('')
    c_input_option.set('')

e_input_add = Button(g_input, text='Add input', command=_input_add)
e_input_add.grid(row=4, column=1)


# ================================================================
# Buttons
# ================================================================

btn_save = Button(master, text='Save configuration', command=configuration_save)
btn_save.grid(row=2, column=0, sticky=W+E+N+S)
btn_quit = Button(master, text='Exit', command=curry(sys.exit, 0))
btn_quit.grid(row=2, column=1, sticky=W+E+N+S)

# ================================================================
# Fill list
# ================================================================
for mod in pymt_modules.list():
    e_modules_list.insert(END, mod)
for opt in pymt_config.options('modules'):
    index = eval(c_modules.get()).index(opt)
    e_modules_list.selection_set(index)
for device_id in pymt_config.options('input'):
    line = pymt_config.get('input', device_id)
    t = '%s=%s' % (str(device_id), str(line))
    e_input_list.insert(END, t)
    e_input_list.selection_set(eval(c_input.get()).index(t))
Пример #4
0
    c_input_devicename.set('')
    c_input_option.set('')


e_input_add = Button(g_input, text='Add input', command=_input_add)
e_input_add.grid(row=4, column=1)

# ================================================================
# Buttons
# ================================================================

btn_save = Button(master,
                  text='Save configuration',
                  command=configuration_save)
btn_save.grid(row=2, column=0, sticky=W + E + N + S)
btn_quit = Button(master, text='Exit', command=curry(sys.exit, 0))
btn_quit.grid(row=2, column=1, sticky=W + E + N + S)

# ================================================================
# Fill list
# ================================================================
for mod in pymt_modules.list():
    e_modules_list.insert(END, mod)
for opt in pymt_config.options('modules'):
    index = eval(c_modules.get()).index(opt)
    e_modules_list.selection_set(index)
for device_id in pymt_config.options('input'):
    line = pymt_config.get('input', device_id)
    t = '%s=%s' % (str(device_id), str(line))
    e_input_list.insert(END, t)
    e_input_list.selection_set(eval(c_input.get()).index(t))