Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #41609

Re: Python GUI questions

Newsgroups comp.lang.python
Date 2013-03-20 10:37 -0700
References <4250fe44-c09c-48a8-aca2-51c1a8bc3a48@googlegroups.com> <e745739b-a9bb-49a3-8a06-1b4ae3f4d901@googlegroups.com> <262b7363-f980-4926-bb36-1f795769b359@googlegroups.com> <495e8e74-2211-4a82-a632-61e1cd16f854@l16g2000yqe.googlegroups.com> <mailman.3542.1363749686.2939.python-list@python.org>
Message-ID <73649809-30f8-4d9e-9247-7d1d0d26af5c@googlegroups.com> (permalink)
Subject Re: Python GUI questions
From Rick Johnson <rantingrickjohnson@gmail.com>

Show all headers | View raw


On Tuesday, March 19, 2013 10:21:06 PM UTC-5, Terry Reedy wrote:
> On 3/19/2013 10:16 PM, Ranting Rick wrote:
> > [snip code]
> 
> when I run this, and click the button, I get:
>
>    TypeError: cbButton() missing 1 required positional argument: 'self'
> 
> ...when I remove 'self' from cbButton, I get the expected
> I should do something here!

Oops :-), good catch Terry! I had copy-pasted the OP's original method however i forgot to remove the "self" parameter; then i had to convert my Python2.x code into 3.x code, which was not terribly difficult, however, this "pit stop" was distracting enough that I forgot to click the button while testing. 

> When I enter something in the Entry box and hit return,
> nothing happens.  

My example does not bind the "KeyPress-ReturnKey" to any callback, so what were you expecting to happen when you pressed enter?

> I presume that is because the example is not complete.

Well it's as complete as it needs to be :-). Any more complete and it would less of a teaching exercise and more of a "copy-paste" exercise. I did not want to just gift wrap an answer for the OP. My hope is that he has the basic skills to turn that incomplete example into useable code. If not, well, then he needs to study that tutorial link i sent early in the thread. 

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Python GUI  questions maiden129 <sengokubasarafever@gmail.com> - 2013-03-19 12:01 -0700
  Re: Python GUI questions Chris Angelico <rosuav@gmail.com> - 2013-03-20 08:39 +1100
    Re: Python GUI questions maiden129 <sengokubasarafever@gmail.com> - 2013-03-19 15:50 -0700
    Re: Python GUI questions maiden129 <sengokubasarafever@gmail.com> - 2013-03-19 15:50 -0700
  Re: Python GUI  questions Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-19 17:57 -0700
    Re: Python GUI  questions maiden129 <sengokubasarafever@gmail.com> - 2013-03-19 18:25 -0700
      Re: Python GUI questions Ranting Rick <rantingrickjohnson@gmail.com> - 2013-03-19 19:16 -0700
        Re: Python GUI questions maiden129 <sengokubasarafever@gmail.com> - 2013-03-19 19:36 -0700
          Re: Python GUI questions Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-19 20:06 -0700
        Re: Python GUI questions Terry Reedy <tjreedy@udel.edu> - 2013-03-19 23:21 -0400
          Re: Python GUI questions Rick Johnson <rantingrickjohnson@gmail.com> - 2013-03-20 10:37 -0700
      Re: Python GUI questions Jason Swails <jason.swails@gmail.com> - 2013-03-19 22:14 -0400
  Re: Python GUI  questions Jan Riechers <janpeterr@freenet.de> - 2013-03-31 16:33 +0300

csiph-web