Re: [Tutor] Searching for email id in MySQL giving wrong results

2006-01-29 Thread Danny Yoo
On Sun, 29 Jan 2006, John Joseph wrote: >I am sending the code of the function "searchbyemail" and the output >of the program when I run I am trying to search and display the >results , even if we give a part of the email_id Hi John, Ok; because the question you're asking looks a l

Re: [Tutor] Searching for email id in MySQL giving wrong results

2006-01-29 Thread John Joseph
--- Danny Yoo <[EMAIL PROTECTED]> wrote: > > Hi John, > > Ok; because the question you're asking looks a > little homework-y, we have > to be a little bit more cautious in our answers. > What part are you > getting stuck on? > > > Do you understand how SQL wildcards work? There's a > good n

Re: [Tutor] Searching for email id in MySQL giving wrong results

2006-01-29 Thread Danny Yoo
> the email id which starts with “j” is > select * from contact where email_id like 'j%'; Hi John, Ok, looks good so far. So in a Python program, we might try something like this: ## ## assuming cursor is set u

Re: [Tutor] Searching for email id in MySQL giving wrong results

2006-01-29 Thread John Joseph
--- Danny Yoo <[EMAIL PROTECTED]> wrote: > > the email id which starts with “j” is > > select * from contact where email_id like 'j%'; > > Hi John, > > Ok, looks good so far. So in a Python program, we > might try something > like this: > > ##

Re: [Tutor] Searching for email id in MySQL giving wrong results

2006-01-29 Thread Alan Gauld
> I am trying to search and display the results , even > if we give a part of the email_id >entry.execute("""SELECT * FROM contact WHERE > email_id = %s """, (s_email,)) If you want to do partial matches you will need to use LIKE ''' SELECT * FROM contact WHERE email_id LIKE %s '

Re: [Tutor] email-sending.. (fwd)

2006-01-29 Thread Danny Yoo
-- Forwarded message -- Date: Sun, 29 Jan 2006 10:28:09 -0500 (EST) From: jan.n <[EMAIL PROTECTED]> To: Danny Yoo <[EMAIL PROTECTED]> Subject: Re: [Tutor] email-sending.. Hi Danny, i have crossed that point where it complains of socket error.., but now i am stuck with another i

Re: [Tutor] Dictionaries

2006-01-29 Thread Victor Bouffier
On Fri, 2006-01-27 at 13:20 -0500, Kent Johnson wrote: > It doesn't make much difference for small dictionaries. keys(), values() > and items() create new lists with the specified elements. iterkeys(), > itervalues() and iteritems() create iterators that return the specified > elements in seque

[Tutor] putting instance variables into a dict

2006-01-29 Thread Shuying Wang
Hi, So I've got a class X with instance variables a, b, c. Is there any way of creating a dictionary of these instance variables besides the no-brainer way of doing dictionary = {'a' : X.a, 'b' : X.b, 'c' : X.c} ? --Shuying ___ Tutor maillist - Tutor@

[Tutor] ANN: Rur-ple lessons 0.36

2006-01-29 Thread Andre Roberge
Announcing RUR-PLE lessons 0.36 RUR-PLE stands for Roberge's Used Robot: a Python Learning Environment. This is the first official release of the lessons, separately from the application. The lessons are intended as a somewhat non-typical introduction to programming using Python, that has been u

Re: [Tutor] putting instance variables into a dict

2006-01-29 Thread Danny Yoo
On Mon, 30 Jan 2006, Shuying Wang wrote: > So I've got a class X with instance variables a, b, c. Is there any way > of creating a dictionary of these instance variables besides the > no-brainer way of doing dictionary = {'a' : X.a, 'b' : X.b, 'c' : X.c} ? Hi Shuying, It's an somewhat low-leve

Re: [Tutor] [Edu-sig] ANN: Rur-ple lessons 0.36

2006-01-29 Thread kirby urner
Hi Andre --I'm going through this first lesson 0.36, not having installed the full wx in this particular Windows machine.I'm very impressed by the quality of these materials, in terms of their graphical sophistication. I also like the multi-lingual approach.  That's something missing from most USA-

[Tutor] A row of cards, but they're all red

2006-01-29 Thread ->Terry<-
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Slackware 10.1 Python 2.4.1 Pygame 1.6 The images (if needed) can be found at: http://members.socket.net/~tvbare/images/> Could someone help me understand the output I'm getting from the snippet below? I thought I would get a nice row of cards, 13

Re: [Tutor] A row of cards, but they're all red

2006-01-29 Thread Danny Yoo
> Could someone help me understand the output I'm getting from the snippet > below? I thought I would get a nice row of cards, 13 reds, 13 blues, > etc. But what I get is a row of all red cards. The rank is correct on > the cards, but they are all red. Hi Terry, There is an issue with the loop