Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-05 Thread Kent Johnson
On Thu, Mar 5, 2009 at 11:36 AM, Wayne Watson wrote: > It looks like your sample code code has the right idea, but the hang up with > the original code is getting entered values back to the main program and > available globally through it. The trick in your code, I think, is to get > the data bac

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-05 Thread Wayne Watson
Yes, you have the idea. Here's about the simplest summary I wrote to another person that I can muster. It may clarify matters. The anumber I'm referring to is in the 80 line version I posted to start this thread. A Simple Explanation (I hope) Consider some of t

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-04 Thread Kent Johnson
On Tue, Mar 3, 2009 at 2:54 PM, Wayne Watson wrote: > I see my post of yesterday, "Maintaining the Same Variable Type--Tkinter", > went over like a lead balloon. :-) > (Note though the Myth Busters TV series successfully built and flew a lead > balloon.) > > Let's see if I can really simplify what

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-04 Thread Alan Gauld
"Wayne Watson" wrote I'm not sure what normal is. Do you have an example, Is this what you have in mind ? =start from Tkinter import * master = Tk() e = Entry(master) e.pack() e.focus_set() def callback(): print e.get() b = Butto

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-04 Thread Wayne Watson
Title: Signature.html I have yet to really use Tkinter to put together any widgets, so I'm not sure what normal is. Do you have an example, or could you construct an example to replace the one in the 80 line program?  My plan is to get this config interface working, and later to worry about con

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-04 Thread Wayne Watson
Title: Signature.html No error messages. Just a clean finish. Alan Gauld wrote: "Wayne Watson" wrote One starts it by double clicking on the py file. And just to be clear, it exits OK when you run it that way? I would expect so since that's the normal way to run a Tkinter

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-04 Thread Alan Gauld
"Wayne Watson" wrote There's another way? Sure, just create normal Entry widgets and capture the input string and convert/assign it as you would a string captured from raw_input() in a console. No magic required. Its slightly more code but I find the auto assignment of values to variab

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-04 Thread Alan Gauld
"Wayne Watson" wrote One starts it by double clicking on the py file. And just to be clear, it exits OK when you run it that way? I would expect so since that's the normal way to run a Tkinter program. IDLE is only intended to be a development tool not a runtime program. Nope. I just t

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-03 Thread Wayne Watson
Title: Signature.html Memory malfunction. I've been using the program to add features so much with IDLE my brain went IDLE. One starts it by double clicking on the py file. It is possible some users might have drifted off into IDLE though, but unlikely. Wayne Watson wrote: Nope. I just tr

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-03 Thread Wayne Watson
Title: Signature.html There's another way? Alan Gauld wrote: "Wayne Watson" wrote Note though the use of control variables like IntVar, etc. FWIW. Personally I never use those "convenience" features of Tk. I prefer to explicitly set and get them myself. Alan G ___

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-03 Thread Wayne Watson
Title: Signature.html Nope. I just tried it. It works fine from there. Interesting, as far as I know, the author wanted us to run it from IDLE. That may explain some other oddities.  I'll check with him. I'm quite sure in his user manual he never talks about the command console. Alan Gauld wro

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-03 Thread Alan Gauld
"Wayne Watson" wrote Note though the use of control variables like IntVar, etc. FWIW. Personally I never use those "convenience" features of Tk. I prefer to explicitly set and get them myself. Alan G ___ Tutor maillist - Tutor@python.org http

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-03 Thread Wayne Watson
Title: Signature.html An interesting thought, I'll ponder it. Note though the use of control variables like IntVar, etc. In the 2000 line original version of all the program, integers, dates, and booleans are in use for the simplified widget I produced. Note to the use of self.anumberVar.set. (

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-03 Thread Wayne Watson
Title: Signature.html I browsed through your response, and it looks like this may be doable. I'll look this over more carefully this evening. It seems as though someone should have had a similar problem in the past. The Tkinter interface seems to be a, I hope, temporary logjam. I don't recall X

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-03 Thread Alan Gauld
"Wayne Watson" wrote Comments? class IntVar_GUI: I just noticed the name of the class. This kind of implies that you are intending writing GUIs for each data type? That shouldn't be necessary since the inputs will be strings in each case. You only need to call the appropriate conversion

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-03 Thread Alan Gauld
destroy() took care of it, but I wonder what advantage there was to Quit()? destroy destroys the widget, quit exits the main loop. destroying the top level widget usually causes the mainloop; to die too so the end result is the same (provided you have no non-modal dialogs open?). HTH, Ala

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-03 Thread Alan Gauld
"Wayne Watson" wrote BTW, the Quit function is original but doesn't kill the window when Quit is used. Does that include running from the command console? Is this another IDLE/Tkinter issue maybe? Alan G. ___ Tutor maillist - Tutor@python.

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-03 Thread Alan Gauld
"Wayne Watson" wrote see my post of yesterday, "Maintaining the Same Variable Type--Tkinter", went over like a lead balloon. :-) Yeah, I had no idea what you meant :-) I've heavily modified the original code to accept a config file, and set up variable to initialize the widgets, trying to

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-03 Thread Wayne Watson
Title: Signature.html WW,     good. Thanks. destroy() took care of it, but I wonder what advantage there was to Quit()? WW W W wrote: On Tue, Mar 3, 2009 at 1:54 PM, Wayne Watson wrote: BTW, the Quit function is original but doesn't kill the window when Quit is used. What fixe

Re: [Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-03 Thread W W
On Tue, Mar 3, 2009 at 1:54 PM, Wayne Watson wrote: > > BTW, the Quit function is original but doesn't kill the window when Quit is > used. What fixes that? For more bonus points, it seems as though the try > statement in the dialog should really bring up an "Error" dialog saying > something is wr

[Tutor] Configuration File, Tkinter, IntVars--Manufacturing Variables

2009-03-03 Thread Wayne Watson
Title: Signature.html I see my post of yesterday, "Maintaining the Same Variable Type--Tkinter", went over like a lead balloon. :-) (Note though the Myth Busters TV series successfully built and flew a lead balloon.) Let's see if I can really simplify what I'm after. I've pulled the essential