Configuration Files and Tkinter--Possible?

W. eWatson notvalid2 at
Wed Mar 4 06:13:43 CET 2009

I'm converting a Tkinter program (Win XP) that uses widgets that allows the 
user to change default values of various parameters like start and stop time 
in hh:mm:ss, time of exposure in seconds, and whether certain options should 
be on or off. The initial values are set in the code. I can pretty well 
modify matters, so the values of parameters can be saved and restored from a 
config file for use outside the widgets (dialogs). Basically, a list of 
parameter names and values are kept in the file.

However, it is a tricky job to set up values for a widget that allows the 
current values to appear in a dialog, and then return them to internal 
storage for use elsewhere. The problem is in trying to make control variable 
dynamic instead of as fixed code. There may be a solution, but it seems as 
though someone should have had a similar problem in the past.

Is Python or Tkinter capable of solving this problem in some fashion? It may 
be that there's another way to set and return values to the widget. However, 
there seems to be an implication one can only do this with Tkinter control 
variables? Another way of saying this is is why are control variables needed 

                                W. eWatson

              (121.015 Deg. W, 39.262 Deg. N) GMT-8 hr std. time)
               Obz Site:  39° 15' 7" N, 121° 2' 32" W, 2700 feet

                     Web Page: <>

More information about the Python-list mailing list