> def test_routine(index): > print index > > for i in range(6): > submenu.add_command( > label=str(i), > command=lambda i=i, cb=test_routine: cb(i) > ) Thanks, works fine! I forgot the 'i=i' in the lambda function I checked. *upps* Sven