Tkinter, Trouble with Message,Label widget

norseman norseman at hughes.net
Sun May 3 19:13:32 EDT 2009


Intended action:
	Two Tkinter windows.
	W1 is complex, user interacts with program from here ONLY
	W2 is for display only, NO user interactions

I can get info to W2.
But to get it to update I first have to manually kill it.
Program does create both. Both terminate when programs says.
I want to post 'verbal' (text) progress reports to W2 and I want it to 
self update at posting. (Or at least appear to do so to the user.) If a 
control sequence is changed, the posting is to reflect it.  As long as I 
manually kill it, everything works fine, but I get:
	1) finger cramps
	2) quite uhhh...  'unhappy' at the stupidity requiring that...

There has to be some way of using a Message or Label (or some) widget as 
a simple posting board.

I have been using the python print statement (via what Windows calls a 
Command Window) quite nicely in Linux.  Under Linux only I would be 
content to go that route. Unfortunately the program also has to work in 
MicroSoft. And Microsoft has much to much of the old dinosaur age still 
in it.

Why the posting board?
	1) It posts for visual inspection the current controls chosen.
               A tally, a synopsis of the current choice pattern.
	2) It remains visible while the control panel vanishes to give
              the user the full screen to conduct the rest of the human
              interface with vendor's product. It reminds the user of
              what is to happen next.
	3) On re-display of main control screen the posting again
              functions as in 1) above. Thus serving as a reminder of
              "What I did last", because it does not change until a
              button is pressed, as well as "What I'm about to do."

This can't be the first time someone has needed this. But I have not 
found (probably just plain missed) it in all Tkinter references I have 
been able to find.

I have tried:
... (overhead)
a= StringVar()
p="string with formatting, variables and new lines"
a.set(p)
...  Label(root, textvar= '%s%s...' % p[:],
and a number of other things  and either it fails completely, looks 
horrible or generates lots of horrible messages telling me it don't like 
me because I'm not allowed to do that. :)

print '%s%s%...' % p[:]     works in any "Command Window", Linux or MS
The   ...Label(...  text= '%s%s%...' % p[:], ....
   works if I manually destroy the posting window to get each update.

I think I need a way to generate the W2 and exit leaving it visible.
Question is  HOW?  Or what is needed to effect the same?
Then the update can destroy old one and put up new one.


ANY  help is appreciated.

Using: Python 2.5.2, Linux Slackware 10.2
Today: 20090503
Snippets: non functional, for clarifying only

Steve



More information about the Python-list mailing list