Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #5867
| From | bvdp <bob@mellowood.ca> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | TK program problem |
| Date | 2011-05-20 11:03 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <9f91909a-ce08-47dd-81d3-e7cf2edad3b6@h12g2000pro.googlegroups.com> (permalink) |
I've just done an update to my system here to Ubuntu 11.04. Mostly no
problems ... but I have an important (to me) python/TK program that's
stopped working. Well, it works ... mostly.
The python version is 2.7.1+ (no idea what the + means!).
I _think_ I have traced the problem to certain menus which call a
class. The calls appear to be ignored.
Basically, what I have is a line like:
bf = makeButtonBar(root, row=0, column=0, buttons=(
("Quit", self.quitall ),
("Stop", self.stopPmidi ),
("New Dir", self.chd),
("Load Playlist", self.playList),
("Favorites", selectFav),
("Options", setOptions) ) )
To create a menu bar. The function makeButtonBar() creates the buttons
with:
for txt, cmd in buttons:
Button(bf, text=txt, height=1, command=cmd).grid(column=c,
row=0, pady=5)
All this is fine (and worked perfectly before my upgrade). The menu
items which are ordinary functions continue to work. BUT the callbacks
which are classes are just ignored when they are clicked.
A cut from one of the ignored classes:
class selectFav:
def __init__(self):
...
And I've inserted some prints in the __init__() and nothing is
printed. Also, converted the class to new-style () but no change there
either.
Either python/tk has changed or my system is totally $*(#*#.
Suggestions welcome!
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
TK program problem bvdp <bob@mellowood.ca> - 2011-05-20 11:03 -0700
Re: TK program problem Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-20 13:20 -0600
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-20 15:12 -0700
Re: TK program problem Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-20 16:33 -0600
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-20 16:07 -0700
Re: TK program problem Ian Kelly <ian.g.kelly@gmail.com> - 2011-05-20 17:29 -0600
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-20 16:34 -0700
Re: TK program problem rantingrick <rantingrick@gmail.com> - 2011-05-20 16:37 -0700
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-21 17:07 -0700
Re: TK program problem Peter Otten <__peter__@web.de> - 2011-05-21 10:18 +0200
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-21 17:03 -0700
Re: TK program problem Terry Reedy <tjreedy@udel.edu> - 2011-05-21 20:33 -0400
Re: TK program problem bvdp <bob@mellowood.ca> - 2011-05-21 19:20 -0700
Re: TK program problem Terry Reedy <tjreedy@udel.edu> - 2011-05-22 17:17 -0400
Re: TK program problem rantingrick <rantingrick@gmail.com> - 2011-05-22 07:03 -0700
Re: TK program problem Chris Angelico <rosuav@gmail.com> - 2011-05-23 00:25 +1000
csiph-web