Re: [Tutor] Adding a GUI

2007-09-15 Thread wormwood_3
I don't think either, I was planning on sticking with wxPython for now, since it is cross-platform, looks way better than Tkinter, and seems to have all the flexibility I would want. But regardless of what toolkit I use, the question of how best to combine it with pre-existent logic still remai

[Tutor] Adding a GUI

2007-09-15 Thread wormwood_3
Hi all, I am just starting to learn GUI programming, with wxPython. I have a script that that I have developed to a useful point, and I want to add a GUI to it. I am a little unsure as the the best approach to this. The script heretofore was just run at the command line. Would it make sense to

Re: [Tutor] referencing vars()

2007-09-15 Thread Alan Gauld
"Michael Langford" <[EMAIL PROTECTED]> wrote > Please show us the function vars(). I don't think we have enough > info to > help without it. Its a builtin, it basically is similar to locals() as used here. Try help(vars) Alan G. ___ Tutor maillis

Re: [Tutor] remove blank list items

2007-09-15 Thread Kent Johnson
Michael Langford wrote: > While the keys() method returns an object of type list, the keys of a > dict (when you leave them in the dict) behave as a "set", as in the > mathematical/computer science idea of a collection of objects where no > two objects have the same value. ( http://en.wikipedia.

Re: [Tutor] Loop optimization

2007-09-15 Thread Kent Johnson
wormwood_3 wrote: > Kent, > > You replied with the following some time ago regarding a question I asked > about optimizing a loop: > >>> You should try an optimized for loop: >>> append_ = self.potdomains.append_ >>> s1_ = suffix1 >>>

Re: [Tutor] referencing vars()

2007-09-15 Thread Kent Johnson
John wrote: > #Set up writer > import csv > vardict=vars() > for var in vardict: > if var=='allcum' or var=='alldhdt': > outfile=in_path+'/'+dataset+'_'+str(var)+'.csv' > writer = csv.writer(open(outfile

Re: [Tutor] Loop optimization

2007-09-15 Thread wormwood_3
Kent, You replied with the following some time ago regarding a question I asked about optimizing a loop: >> You should try an optimized for loop: >> append_ = self.potdomains.append_ >> s1_ = suffix1 >> s2_ = suffix2 >>

Re: [Tutor] referencing vars()

2007-09-15 Thread Alan Gauld
"John" <[EMAIL PROTECTED]> wrote >import csv >vardict=vars() >for var in vardict: >if var=='allcum' or var=='alldhdt': > > outfile=in_path+'/'+dataset+'_'+str(var)+'.csv' >writer = csv.writer(open(outfile, "wb")) >

Re: [Tutor] referencing vars()

2007-09-15 Thread Michael Langford
Please show us the function vars(). I don't think we have enough info to help without it. On 9/15/07, John <[EMAIL PROTECTED]> wrote: > > #Set up writer > import csv > vardict=vars() > for var in vardict: > if var=='allcum' or var=='alldhdt': >

[Tutor] referencing vars()

2007-09-15 Thread John
#Set up writer import csv vardict=vars() for var in vardict: if var=='allcum' or var=='alldhdt': outfile=in_path+'/'+dataset+'_'+str(var)+'.csv' writer = csv.writer(open(outfile, "wb"))

Re: [Tutor] remove blank list items

2007-09-15 Thread Michael Langford
While the keys() method returns an object of type list, the keys of a dict (when you leave them in the dict) behave as a "set", as in the mathematical/computer science idea of a collection of objects where no two objects have the same value. (http://en.wikipedia.org/wiki/Set) The keys of the dicti

Re: [Tutor] writing the correct map names

2007-09-15 Thread Alan Gauld
"Paul Coones" <[EMAIL PROTECTED]> wrote > #if faceUV = 0: > > texture_map = "NULL.TIF" > > if me.hasVertexUV(): > print "must be a texture map!" > texture_map = current_obj.name > texture_map = texture_map + ".TIF" etc/... > When I do have a mapped object, the script is not putting in the map >

Re: [Tutor] Is there some sort of Python Error log.

2007-09-15 Thread Alan Gauld
"Lamonte Harris" <[EMAIL PROTECTED]> wrote in message > Command prompt is a pain and it would be pretty nice to have this > feature. In what respect is command prompt a pain? Which command prompt(the OS or Python >>>)? If Python are you using the vanilla interpreter or an IDE? If anIDE which one

Re: [Tutor] vi and python

2007-09-15 Thread Alan Gauld
"Danyelle Gragsone" <[EMAIL PROTECTED]> wrote > Sorry for the misunderstanding. Since vim points to vi > automatically > I have gotten used to calling it vi. But I did mean vim. Just to be picky, vi points to vim. vim is the program vi is an alias. So if you type vi it executes vim. But diff