[Tkinter-discuss] Installing Tk.framework to directory other than system directories

2007-02-16 Thread jstradli
Hello, Platform: Mac OS X 10.4 I'm trying to install the Tk.framework to a directory other than /Library/Frameworks or /System/Library/Frameworks or ~/Library/Frameworks . I'm wanting to do this so I can create Mac packages with a custom build of Python, Tkinter and some additional modules that

Re: [Tkinter-discuss] Problems with lambda functions in callbacks

2007-02-16 Thread Dídac Busquets
Hi, Thank you all for you responses. With Stewart's answer I could get it working. Those were my first lines in python (that is why I had so many semi-colons - I'm so used to C and C++). And also thanks for the explanation. One really needs to know how the programming language works when writi

Re: [Tkinter-discuss] Problems with lambda functions in callbacks

2007-02-16 Thread mkieverpy
Hello Dídac, just to add an explanation, why your code doesn't work: >from Tkinter import * > >root = Tk(); > >def cb(x): >print x; >for i in range(5): >b = Button(root,text=i,command=lambda:cb(i)); The part "lambda:cb(i)" is a function which gets evaluated (called) when a button is