Re: How do i reduce this to a single function - the code is largely similar, just a direction of search toggle.

2014-11-09 Thread Veek M
Ned Batchelder wrote: > On 11/7/14 9:52 AM, Veek M wrote: > and you want to end up on the "def" token, not the "def" in yep, bumped into this :) thanks! -- https://mail.python.org/mailman/listinfo/python-list

Re: How do i reduce this to a single function - the code is largely similar, just a direction of search toggle.

2014-11-08 Thread Ned Batchelder
On 11/7/14 9:52 AM, Veek M wrote: Veek M wrote: new_col = self.b[row].index('def') self.w.cursor = row, new_col new_col = self.b[row].rindex('def') self.w.cursor = row, new_col There's also the different methods index vs

Re: How do i reduce this to a single function - the code is largely similar, just a direction of search toggle.

2014-11-07 Thread Denis McMahon
On Fri, 07 Nov 2014 16:46:19 +0630, Veek M wrote: (1) Pass a true or false parameter to the function as the direction of search toggle. (2) replace the relevant assignments with something like: variable = something if condition else something else (3) Figuring out the while loop control is a

Re: How do i reduce this to a single function - the code is largely similar, just a direction of search toggle.

2014-11-07 Thread Veek M
Veek M wrote: > new_col = self.b[row].index('def') > self.w.cursor = row, new_col > new_col = self.b[row].rindex('def') > self.w.cursor = row, new_col There's also the different methods index vs rindex. Does this sort of thing jus

Re: How do i reduce this to a single function - the code is largely similar, just a direction of search toggle.

2014-11-07 Thread Chris Angelico
On Fri, Nov 7, 2014 at 9:16 PM, Veek M wrote: > def jump_to_blockD(self): > end = len(self.b) > row, col = self.w.cursor > while row <= end: > try: > new_col = self.b[row].index('def') > self.w.cursor = row, new_col >

Re: How do i reduce this to a single function - the code is largely similar, just a direction of search toggle.

2014-11-07 Thread Denis McMahon
On Fri, 07 Nov 2014 21:22:22 +0630, Veek M wrote: > Veek M wrote: > > >> new_col = self.b[row].index('def') self.w.cursor = row, >> new_col > >> new_col = self.b[row].rindex('def') >> self.w.cursor = row, new_col > > There's also

Re: How do i reduce this to a single function - the code is largely similar, just a direction of search toggle.

2014-11-07 Thread Joel Goldstick
On Fri, Nov 7, 2014 at 5:16 AM, Veek M wrote: > def jump_to_blockD(self): > end = len(self.b) > row, col = self.w.cursor > while row <= end: > try: > new_col = self.b[row].index('def') > self.w.cursor = row, new_col >

How do i reduce this to a single function - the code is largely similar, just a direction of search toggle.

2014-11-07 Thread Veek M
def jump_to_blockD(self): end = len(self.b) row, col = self.w.cursor while row <= end: try: new_col = self.b[row].index('def') self.w.cursor = row, new_col break except ValueError: pa

Re: [OT] spelling colour / color was Re: Toggle

2014-10-18 Thread giacomo boffi
duncan smith writes: > [...] It was the "top / bottom of the [TV] programme" that I didn't > immediately get, because I was thinking of a timeline running left > to right (perhaps rather than the script used by the presenters). is it just me that thinks of a timeline running from the wall behind

Re: Toggle

2014-10-13 Thread alister
d bite your >> behind when you least expect it. > > More generally, I'd say that this is solving a (very) slightly different > problem: it's providing a "toggle with default" feature, > where the part after the else is the default. If you don't want a > defau

Re: Toggle

2014-10-12 Thread Chris Angelico
his is solving a (very) slightly different problem: it's providing a "toggle with default" feature, where the part after the else is the default. If you don't want a default, that's a bug. I've known times when that default makes life a lot easier, in which case it'd be a feature. ChrisA -- https://mail.python.org/mailman/listinfo/python-list

Re: [OT] spelling colour / color was Re: Toggle

2014-10-11 Thread duncan smith
On 11/10/14 20:55, William Ray Wing wrote: > On Oct 11, 2014, at 3:20 PM, Dennis Lee Bieber wrote: > >> On Sat, 11 Oct 2014 16:26:43 +0100, duncan smith >> declaimed the following: >> >> >>> The media have their own quirks when it comes to English. The BBC >>> regularly use "top of" / "bottom of

Re: [OT] spelling colour / color was Re: Toggle

2014-10-11 Thread William Ray Wing
On Oct 11, 2014, at 3:20 PM, Dennis Lee Bieber wrote: > On Sat, 11 Oct 2014 16:26:43 +0100, duncan smith > declaimed the following: > > >> The media have their own quirks when it comes to English. The BBC >> regularly use "top of" / "bottom of" in the sense of "start of" / "end >> of", but I d

Re: [OT] spelling colour / color was Re: Toggle

2014-10-11 Thread Simon Ward
On 11 October 2014 10:37:51 BST, Christian Gollwitzer wrote: >I tend to agree that British English is the "correct" version for me, >since I'm European, though not British. > >The usage of -ise in verbs, however, is a newer attempt to set the >British English apart from the American: > >

Re: [OT] spelling colour / color was Re: Toggle

2014-10-11 Thread duncan smith
On 11/10/14 12:45, mm0fmf wrote: > On 11/10/2014 10:37, Christian Gollwitzer wrote: >> Being a non-native English speaker/writer, I myself stick to the >> recommendations of the Oxford dictionary. >> >> Christian > > But you do realise the Oxford dictionary is different to English usage > and

Re: [OT] spelling colour / color was Re: Toggle

2014-10-11 Thread mm0fmf
On 11/10/2014 10:37, Christian Gollwitzer wrote: Being a non-native English speaker/writer, I myself stick to the recommendations of the Oxford dictionary. Christian But you do realise the Oxford dictionary is different to English usage and is renowned for using what is known as Oxford s

Re: [OT] spelling colour / color was Re: Toggle

2014-10-11 Thread Chris Angelico
On Sat, Oct 11, 2014 at 9:33 PM, Marko Rauhamaa wrote: > I'm getting a new appreciation for Lisp's age-old "car" and "cdr". > > The scientists have done this international thing for centuries. Their > single-letter naming might be the secret of their glorious success. > > Obscure acronyms for the

Re: [OT] spelling colour / color was Re: Toggle

2014-10-11 Thread Marko Rauhamaa
Dennis Lee Bieber : > And then there is REXX... Which deliberately has both centre() and > center() in its standard library -- and they do the same thing... I'm getting a new appreciation for Lisp's age-old "car" and "cdr". The scientists have done this international thing for centuries. Their s

Re: [OT] spelling colour / color was Re: Toggle

2014-10-11 Thread Christian Gollwitzer
Am 10.10.14 22:05, schrieb alister: Would the French tolerate me using an alternative Variant (Canadian or Carribean)? I think not UK English as spoken in England is the definitive version. The clue is in the Name - English not American I tend to agree that British English is the "correct" ver

Re: [OT] spelling colour / color was Re: Toggle

2014-10-10 Thread alister
On Fri, 10 Oct 2014 22:01:58 +0300, Marko Rauhamaa wrote: > alister : > >> On Thu, 09 Oct 2014 23:48:36 +0300, Marko Rauhamaa wrote: >> >>> "-ize" is standard everywhere in the English-speaking world. >> >> Not in England! > > http://www.oxforddictionaries.com/definition/english/realize> > > Bo

Re: [OT] spelling colour / color was Re: Toggle

2014-10-10 Thread Marko Rauhamaa
alister : > On Thu, 09 Oct 2014 23:48:36 +0300, Marko Rauhamaa wrote: > >> "-ize" is standard everywhere in the English-speaking world. > > Not in England! http://www.oxforddictionaries.com/definition/english/realize> Both -ize and -ise are valid in England. >> why wouldn't you use American Eng

Re: [OT] spelling colour / color was Re: Toggle

2014-10-10 Thread Mark Lawrence
On 10/10/2014 15:46, Neil D. Cerutti wrote: On 10/9/2014 3:53 PM, Tim Delaney wrote: That would be a theatre programme vs a computer program. I try to stick with the current spelling style when modifying existing code - esp. for APIs. It's very annoying to have some methods use "z" and others "

Re: [OT] spelling colour / color was Re: Toggle

2014-10-10 Thread Mark Lawrence
On 09/10/2014 23:53, Terry Reedy wrote: Like it or not, Python uses American English. It is my understanding that this has been agreed to by a Dutch born dictator. The traitor should be shot, selling out his fellow Europeans to the North Americans indeed :) -- My fellow Pythonistas, ask

Re: [OT] spelling colour / color was Re: Toggle

2014-10-10 Thread alister
On Thu, 09 Oct 2014 23:48:36 +0300, Marko Rauhamaa wrote: > Tim Delaney : > >> It's very annoying to have some methods use "z" and others "s" in the >> same package. > > "-ize" is standard everywhere in the English-speaking world. Not in England! > > Americans insist on "analyze," "paralyze" a

Re: [OT] spelling colour / color was Re: Toggle

2014-10-10 Thread Neil D. Cerutti
On 10/9/2014 3:53 PM, Tim Delaney wrote: That would be a theatre programme vs a computer program. I try to stick with the current spelling style when modifying existing code - esp. for APIs. It's very annoying to have some methods use "z" and others "s" in the same package. So since I'm currentl

Re: Toggle

2014-10-10 Thread Chris Angelico
On Sat, Oct 11, 2014 at 1:28 AM, Rustom Mody wrote: >> If you dont find all this confusing, I am reminded of Schrödinger (or >> one of his ilk): > >> If you dont find Quantum physics confusing you've not begun to understand it > > Ok: Not Schrödinger but John Wheeler: > http://www.colorado.edu/phy

Re: Toggle

2014-10-10 Thread Rustom Mody
On Friday, October 10, 2014 7:54:33 PM UTC+5:30, Rustom Mody wrote: > More telling comments from Alex (same SO post) > 1. Both have mostly useless default implementations > 2. if you override __repr__, that's ALSO used for __str__, but not vice versa > 3. despite the words on the subject found in t

Re: Toggle

2014-10-10 Thread Rustom Mody
On Friday, October 10, 2014 12:48:20 PM UTC+5:30, Steven D'Aprano wrote: > Rustom Mody wrote: > > On Thursday, October 9, 2014 10:26:41 AM UTC+5:30, Steven D'Aprano wrote: > >> On Wed, 08 Oct 2014 19:34:30 -0700, Rustom Mody wrote: > >> Color.Red > >> print (Color.Red) > >> > Color.Red >

Re: Toggle

2014-10-10 Thread Antoon Pardon
Op 09-10-14 om 03:42 schreef Ben Finney: > Seymore4Head writes: > >> I want to toggle between color="Red" and color="Blue" > It's good to cultivate ongoing familiarity with the standard library > https://docs.python.org/3/library/itertools.html#ite

Re: [OT] spelling colour / color was Re: Toggle

2014-10-10 Thread Chris Angelico
On Fri, Oct 10, 2014 at 9:51 PM, Marko Rauhamaa wrote: > Chris Angelico : > >> If Python ever grows a 'color' statement or keyword, then sure. >> Otherwise, it's just identifiers and data, which are international. > > Do you mean that the Python syntax should use American spellings, but > the Pyth

Re: [OT] spelling colour / color was Re: Toggle

2014-10-10 Thread Marko Rauhamaa
Chris Angelico : > If Python ever grows a 'color' statement or keyword, then sure. > Otherwise, it's just identifiers and data, which are international. Do you mean that the Python syntax should use American spellings, but the Python standard library could use words like "colour", "Farbe", "väri"

Re: [OT] spelling colour / color was Re: Toggle

2014-10-10 Thread Chris Angelico
On Fri, Oct 10, 2014 at 9:08 PM, Marko Rauhamaa wrote: > Steven D'Aprano : > >> Python is an international product, not American. > > And American English is the international software engineering language, > minority or not. > > The rest of us are using it; why should you not follow suit? If Pyt

Re: [OT] spelling colour / color was Re: Toggle

2014-10-10 Thread Marko Rauhamaa
Steven D'Aprano : > Python is an international product, not American. And American English is the international software engineering language, minority or not. The rest of us are using it; why should you not follow suit? Marko -- https://mail.python.org/mailman/listinfo/python-list

Re: Toggle

2014-10-10 Thread Steven D'Aprano
Rustom Mody wrote: > On Thursday, October 9, 2014 10:26:41 AM UTC+5:30, Steven D'Aprano wrote: >> On Wed, 08 Oct 2014 19:34:30 -0700, Rustom Mody wrote: > >> Color.Red >> print (Color.Red) >> > Color.Red >> > # Not sure what to make of that distinction... > >> That's because the intera

Re: Toggle

2014-10-10 Thread Steven D'Aprano
Rustom Mody wrote: > In fact this: >> >>> Color.blue.toggle() >> >> >>> Color.blue.toggle().toggle() >> > > is a nice example of a pattern that is rarely seen: > OO syntax, functional (ie non-state-changing) semantics. You don't wri

Re: [OT] spelling colour / color was Re: Toggle

2014-10-10 Thread Steven D'Aprano
Terry Reedy wrote: > On 10/9/2014 1:43 PM, mm0fmf wrote: >> On 09/10/2014 02:29, Steven D'Aprano wrote: >>> Apart from the horrible spelling of colour :-) >> >> I've always spelt colour as "color" when programming and as "colour" >> when writing language including documentation about software. >

Re: [OT] spelling colour / color was Re: Toggle

2014-10-10 Thread Chris Angelico
On Fri, Oct 10, 2014 at 5:52 PM, Steven D'Aprano wrote: > "Normal" programmers spell words the same in code as they do outside of > code, e.g.: > > age > address > length There's a difference between identifiers and commands, though. I would expect, for instance, that a customer's add

Re: [OT] spelling colour / color was Re: Toggle

2014-10-09 Thread Steven D'Aprano
mm0fmf wrote: > On 09/10/2014 02:29, Steven D'Aprano wrote: >> Apart from the horrible spelling of colour :-) > > I've always spelt colour as "color" when programming and as "colour" > when writing language including documentation about software. > > colour in a programme doesn't seem right. "N

Re: [OT] spelling colour / color was Re: Toggle

2014-10-09 Thread Chris Angelico
On Fri, Oct 10, 2014 at 9:53 AM, Terry Reedy wrote: > >> colour in a programme doesn't seem right. > > Perhaps ironically, there are 52 uses of 'colour' in the stdlib, all but 4 > in idlelib, and most of those in one file. I just changed all except in the > one file. I agree, although I wouldn't

Re: [OT] spelling colour / color was Re: Toggle

2014-10-09 Thread Terry Reedy
On 10/9/2014 1:43 PM, mm0fmf wrote: On 09/10/2014 02:29, Steven D'Aprano wrote: Apart from the horrible spelling of colour :-) I've always spelt colour as "color" when programming and as "colour" when writing language including documentation about software. Like it or not, Python uses Americ

Re: Toggle

2014-10-09 Thread Terry Reedy
On 10/9/2014 8:42 AM, Rustom Mody wrote: On Thursday, October 9, 2014 1:21:49 PM UTC+5:30, Peter Otten wrote: Rustom Mody wrote: BTW is there some flag that can make them identical? No flag, but you can tweak that P: import sys sys.displayhook = print "foo" foo def f(): pass ... f()

Re: [OT] spelling colour / color was Re: Toggle

2014-10-09 Thread Marko Rauhamaa
Tim Delaney : > It's very annoying to have some methods use "z" and others "s" in the > same package. "-ize" is standard everywhere in the English-speaking world. Americans insist on "analyze," "paralyze" and "catalyze" but paradoxically also on "lyse". > So since I'm currently working for a US

Re: [OT] spelling colour / color was Re: Toggle

2014-10-09 Thread Tim Delaney
On 10 October 2014 05:24, duncan smith wrote: > On 09/10/14 18:43, mm0fmf wrote: > > On 09/10/2014 02:29, Steven D'Aprano wrote: > >> Apart from the horrible spelling of colour :-) > > > > I've always spelt colour as "color" when programming and as "colour" > > when writing language including doc

Re: [OT] spelling colour / color was Re: Toggle

2014-10-09 Thread duncan smith
On 09/10/14 18:43, mm0fmf wrote: > On 09/10/2014 02:29, Steven D'Aprano wrote: >> Apart from the horrible spelling of colour :-) > > I've always spelt colour as "color" when programming and as "colour" > when writing language including documentation about software. > > colour in a programme doesn

[OT] spelling colour / color was Re: Toggle

2014-10-09 Thread mm0fmf
On 09/10/2014 02:29, Steven D'Aprano wrote: Apart from the horrible spelling of colour :-) I've always spelt colour as "color" when programming and as "colour" when writing language including documentation about software. colour in a programme doesn't seem right. -- https://mail.python.org/

Re: Toggle

2014-10-09 Thread Rustom Mody
On Thursday, October 9, 2014 9:39:07 PM UTC+5:30, Ian wrote: > On Wed, Oct 8, 2014 at 8:34 PM, Rustom Mody wrote: > > On Thursday, October 9, 2014 7:12:41 AM UTC+5:30, Ben Finney wrote: > >> Seymore4Head writes: > >> > I want to toggle between color="Red&

Re: Toggle

2014-10-09 Thread Ian Kelly
On Wed, Oct 8, 2014 at 8:34 PM, Rustom Mody wrote: > On Thursday, October 9, 2014 7:12:41 AM UTC+5:30, Ben Finney wrote: >> Seymore4Head writes: > >> > I want to toggle between color="Red" and color="Blue" > >> It's good to cultivate ongoing

Re: Toggle

2014-10-09 Thread alister
On Thu, 09 Oct 2014 17:57:03 +1300, Gregory Ewing wrote: > Seymore4Head wrote: >> I want to toggle between color="Red" and color="Blue" > > toggle = {"Red": "Blue", "Blue": "Red"} > color = toggle[color] How about a

Re: Toggle

2014-10-09 Thread Rustom Mody
On Thursday, October 9, 2014 1:21:49 PM UTC+5:30, Peter Otten wrote: > Rustom Mody wrote: > > BTW is there some flag that can make them identical? > No flag, but you can tweak that P: > >>> import sys > >>> sys.displayhook = print > >>> "foo" > foo > >>> def f(): pass > ... > >>> f() > None Yea

Re: Toggle

2014-10-09 Thread Peter Otten
Rustom Mody wrote: > On Thursday, October 9, 2014 10:26:41 AM UTC+5:30, Steven D'Aprano wrote: >> On Wed, 08 Oct 2014 19:34:30 -0700, Rustom Mody wrote: > >> Color.Red >> print (Color.Red) >> > Color.Red >> > # Not sure what to make of that distinction... > >> That's because the intera

Re: Toggle

2014-10-08 Thread Chris Angelico
On Thu, Oct 9, 2014 at 4:39 PM, Rustom Mody wrote: > On Thursday, October 9, 2014 10:26:41 AM UTC+5:30, Steven D'Aprano wrote: >> On Wed, 08 Oct 2014 19:34:30 -0700, Rustom Mody wrote: > >> Color.Red >> print (Color.Red) >> > Color.Red >> > # Not sure what to make of that distinction...

Re: Toggle

2014-10-08 Thread Rustom Mody
On Thursday, October 9, 2014 10:26:41 AM UTC+5:30, Steven D'Aprano wrote: > On Wed, 08 Oct 2014 19:34:30 -0700, Rustom Mody wrote: > Color.Red > print (Color.Red) > > Color.Red > > # Not sure what to make of that distinction... > That's because the interactive interpreter displays the r

Re: Toggle

2014-10-08 Thread Travis Griggs
On Oct 8, 2014, at 9:57 PM, Gregory Ewing wrote: > Seymore4Head wrote: >> I want to toggle between color="Red" and color="Blue" Don’t forget polymorphic dispatch… class Red(object): def toggle(self): return Blue() class Blue(object): def tog

Re: Toggle

2014-10-08 Thread Gregory Ewing
Seymore4Head wrote: I want to toggle between color="Red" and color="Blue" toggle = {"Red": "Blue", "Blue": "Red"} color = toggle[color] -- https://mail.python.org/mailman/listinfo/python-list

Re: Toggle

2014-10-08 Thread Steven D'Aprano
On Wed, 08 Oct 2014 19:34:30 -0700, Rustom Mody wrote: Color.Red > print (Color.Red) > Color.Red > > # Not sure what to make of that distinction... That's because the interactive interpreter displays the repr() of objects (except for None, which it suppresses), while print outputs th

Re: Toggle

2014-10-08 Thread Chris Angelico
On Thu, Oct 9, 2014 at 2:54 PM, wrote: > On Wed, Oct 8, 2014, at 23:02, Mark Lawrence wrote: >> When I first read this I was extremely jealous of the originator but >> having used it umpteen times I'm still extremely jealous of the >> originator!!! Why doesn't my mind work like his? :) > > You c

Re: Toggle

2014-10-08 Thread random832
On Wed, Oct 8, 2014, at 23:02, Mark Lawrence wrote: > When I first read this I was extremely jealous of the originator but > having used it umpteen times I'm still extremely jealous of the > originator!!! Why doesn't my mind work like his? :) You could also keep the ints in two variables and do

Re: Toggle

2014-10-08 Thread Mark Lawrence
On 09/10/2014 02:25, Mark Lawrence wrote: On 09/10/2014 01:11, Seymore4Head wrote: I want to toggle between color="Red" and color="Blue" Here is one: if color == "Red": color = "Blue" else: color = "Red" Here is two

Re: Toggle

2014-10-08 Thread Rustom Mody
On Thursday, October 9, 2014 7:12:41 AM UTC+5:30, Ben Finney wrote: > Seymore4Head writes: > > I want to toggle between color="Red" and color="Blue" > It's good to cultivate ongoing familiarity with the standard library And language. In recent python3:

Re: Toggle

2014-10-08 Thread Ben Finney
Seymore4Head writes: > I want to toggle between color="Red" and color="Blue" It's good to cultivate ongoing familiarity with the standard library https://docs.python.org/3/library/itertools.html#itertools.cycle> so that you can make use of wheels already invent

Re: Toggle

2014-10-08 Thread Steven D'Aprano
Seymore4Head wrote: > I want to toggle between color="Red" and color="Blue" > Here is one: > if color == "Red": > color = "Blue" > else: > color = "Red" Apart from the horrible spelling of colour :-) th

Re: Toggle

2014-10-08 Thread Mark Lawrence
On 09/10/2014 01:11, Seymore4Head wrote: I want to toggle between color="Red" and color="Blue" Here is one: if color == "Red": color = "Blue" else: color = "Red" Here is two: if x = "True" col

Toggle

2014-10-08 Thread Seymore4Head
I want to toggle between color="Red" and color="Blue" Here is one: if color == "Red": color = "Blue" else: color = "Red" Here is two: if x = "True" color = "Red" else: color="Blue" x= not x Others? -- https://mail.python.org/mailman/listinfo/python-list

toggle name, With explanations

2012-07-30 Thread Eric S. Johansson
es the limits of the region of interest. example: s.pack(side=Tkinter.R^IGHT, fill=Tkinter.Y) the carrot marks the current position. If I was to say this point, "toggle word", I would first look to the left and the right and look forward the character string stopped looking like a sym

Re: Tkinter/WindowsXP - how to use checkbutton to toggle a label in GUI?

2008-08-21 Thread Gabriel Genellina
En Thu, 21 Aug 2008 05:07:45 -0300, <[EMAIL PROTECTED]> escribi�: I've a checkbutton in my GUI application which I want to work as: 1. it should be un-ticked by default, 2. should display a label in Gui, by default, 3. when user ticks the check button this should the above label goes off the sc

Tkinter/WindowsXP - how to use checkbutton to toggle a label in GUI?

2008-08-21 Thread dudeja . rajat
Hi, I've a checkbutton in my GUI application which I want to work as: 1. it should be un-ticked by default, 2. should display a label in Gui, by default, 3. when user ticks the check button this should the above label goes off the screen and not longer is displayed. Please suggest how could I

Re: Tkinter toggle a Label Widget based on checkbutton value

2007-07-05 Thread Eric Brunel
1) Press Enable IP, the Label IP should be shown. > 2) Toggle Enable IP (So that its unset). the Label IP should not be > shown. > > #!/usr/bin/python > from Tkinter import * > root = Tk() > root.title('something') > x = StringVar() > def display(): > if x.

Re: Tkinter toggle a Label Widget based on checkbutton value

2007-07-04 Thread O.R.Senthil Kumaran
* Wojciech Mu?a <[EMAIL PROTECTED]> [2007-07-04 20:13:06]: > O.R.Senthil Kumaran wrote: > > Any suggestions on how can i make this checkbutton effect. > > 1) Press Enable IP, the Label IP should be shown. > > 2) Toggle Enable IP (So that its unset). the L

Re: Tkinter toggle a Label Widget based on checkbutton value

2007-07-04 Thread Wojciech Muła
O.R.Senthil Kumaran wrote: > Any suggestions on how can i make this checkbutton effect. > 1) Press Enable IP, the Label IP should be shown. > 2) Toggle Enable IP (So that its unset). the Label IP should not be shown. > > #!/usr/bin/python > from Tkinter import * > roo

Tkinter toggle a Label Widget based on checkbutton value

2007-07-04 Thread O.R.Senthil Kumaran
enabled (shown), its not very-straightforward to hide it from the window. Any suggestions on how can i make this checkbutton effect. 1) Press Enable IP, the Label IP should be shown. 2) Toggle Enable IP (So that its unset). the Label IP should not be shown. #!/usr/bin/python from Tkinter import

Toggle button in a ListStore in pygtk, i cant make it work!

2006-03-12 Thread sapo
umn_with_attributes(1,"Install",renderer2, text=1) self.list.append(self.options) tree.set_model(self.list) def selection( self, cell, path, model ): model[path][0] = not model[path][0] return It shows up but the toggle butto