<koenig at v-i-t.de> wrote in message news:9bhs59$kej$1 at sun27.hrz.tu-darmstadt.de... > hi > > in tkinter: > why can callback functions onlx have one parameter? > when i press a button, i want that a function is executed with many parameters, > so that i can pass the function a filename or something to work with that. > > how can i do such things? Tuples are your friends. def f(args): a, b = args print 'Received args %s and %s.' % (a, b) def call_f(arg): f(arg) call_f(('Hello', 'spam')) -- Rainer Deyke (root at rainerdeyke.com) Shareware computer games - http://rainerdeyke.com "In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4