J
Joe S
(Python newbie alert..only 1 week's experience)
I want to create several menu items based upon a config file. In this
config file are label, function and a parameter. I want to show label
in the menu, then when it's chosen, call function with the given
parameter.
How can I do the correct equivalent of the following (which definitely
doesn't work)?
l='Zooks'
f='func'
p='Got Zooks'
M.menu.add_command(label=l, command=lambda: f(p))
so that when I pick 'Zooks' from the menu, func gets called with 'Got
Zooks'.
Joe
I want to create several menu items based upon a config file. In this
config file are label, function and a parameter. I want to show label
in the menu, then when it's chosen, call function with the given
parameter.
How can I do the correct equivalent of the following (which definitely
doesn't work)?
l='Zooks'
f='func'
p='Got Zooks'
M.menu.add_command(label=l, command=lambda: f(p))
so that when I pick 'Zooks' from the menu, func gets called with 'Got
Zooks'.
Joe