[Tutor] tkFileDialog bug on windows

2005-12-02 Thread Fred Lionetti
Hi everyone, I may have found a strange bug with tkFileDialog, and I'm wondering if anyone has a workaround for the problem. It happens when you have a button (or any other clickable widget) directly behind the askopenfilename dialog box and double click on a file. The button (behind the open fi

[Tutor] compiled images

2005-11-17 Thread Fred Lionetti
Hi everyone, Thanks everyone for the help with lambda expressions! Your suggestions and discussions were great! I've got another question I think you may have come across before. I'm planning on purchasing a license to use some stock icons in an application I'm developing. The problem is the l

Re: [Tutor] Using lists as table-like structure

2005-11-16 Thread Fred Lionetti
Hi Bernard, You can do this with Numeric (http://numeric.scipy.org/) import Numeric aList = [ [1,1,1], [2,2,2,], [3,3,3] ] bList = Numeric.array(aList, "i") print bList[:,0] displays-> [1 2 3] you can convert the array back to a list if you want like this: bList.tolist() so... result = Numeri

[Tutor] lambda in a loop

2005-11-16 Thread Fred Lionetti
Hi everyone, If I have this code: def doLambda(val): print "value 2:", val commands = [] for value in range(5): print "value 1:", value commands.append(lambda:doLambda(value)) for c in commands: c() -- my output

[Tutor] automatically finding site-packages and python2.3 in a linux machine

2005-01-06 Thread Fred Lionetti
Hi everyone, I'm working on creating an installer for my program using install shield, and I'd like to know how one can automatically determine if Python 2.3 is installed on a linux machine, and where site-packages is located (so that I can install my own files there). For my Windows version I wa