FW: Re: [Tutor] mouse_buttons()

Leung Cris krazie_mu_boi at hotmail.com
Mon Dec 1 17:05:31 EST 2003




>From: Danny Yoo <dyoo at hkn.eecs.berkeley.edu>
>To: Leung Cris <krazie_mu_boi at hotmail.com>
>CC: tutor at python.org
>Subject: Re: [Tutor] mouse_buttons()
>Date: Mon, 1 Dec 2003 10:34:20 -0800 (PST)
>
>
>
>On Sun, 30 Nov 2003, Leung Cris wrote:
>
> > How do I use that function? It's from Livewires . It returns three
> > values, the middle , right, and left button. Depending on whether it is
> > clicked, it will return a 0 or 1. But how do I get it so that when I
> > click on the screen, it will stop? I've triedthis:
> >
> > while 1:
> >   mouse_buttons()
> >   if mouse_buttons() == 1
> >     break
> >
> >
> > but... it doens't work
>
>
>Hi Leung,
>
>
>What does mouse_buttons() give back to us?  Is it a number, or a list,
>or...?
>
>
>I see that you're trying to guess this by seeing if it's an integer.  And
>this is something that, with enough flailing, can be guessed with time.
>But we can accelerate the process.  *grin*
>
>
>Take a closer look at:
>
>     http://www.livewires.org.uk/python/pdf/G-graphics.pdf
>
>
>According to the documentation, mouse_buttons() is a function that returns
>a dictionary.  So you'll need to treat the return value of mouse_buttons()
>as a dictionary with keys 'left', 'middle', and 'right'.
>
>
>
>If you have more questions, please feel free to ask.  Good luck to you!
>


I'm not really familliar with "dictionary", can someone tell me how to access one?

_________________________________________________________________
¨Ï¥Î MSN Messenger¡A»PªB¤Í¦b½u¤W²á¤Ñ: http://messenger.microsoft.com/tc 




More information about the Tutor mailing list