Re: [Tutor] sending email via smtplib

2012-11-18 Thread Saad Javed
I don't think using SSL works with hotmail. I tried using: smtplib.*SMTP_SSL*("smtp.live.com", 587) smtplib.login(user, passwd) ... That gave this error: Traceback (most recent call last): File "sendemail.py", line 22, in smtp = smtplib.SMTP_SSL(smtp_srv, 587) File "/usr/lib/python2.7/s

Re: [Tutor] sending email via smtplib

2012-11-18 Thread Alexander
On Sun, Nov 18, 2012 at 12:23 AM, Saad Javed wrote: > import smtplib > > from_addr = "some_a...@hotmail.com" > to_addr = "some_a...@gmail.com" > smtp_srv = "smtp.live.com" > > subject = "Test" > message = "Test" > > msg = "To:%s\nFrom:%s\nSubject: %s\n\n%s" % (to_addr, from_addr, subject, > messa

Re: [Tutor] LCM

2012-11-18 Thread Dave Angel
On 11/18/2012 12:50 PM, Andrew wrote: > On Wed, 14 Nov 2012 19:52:03 +0200, Selby Rowley Cannon > wrote: > >> Hey, >> >> I've been trying to write a function to find the Lowest Common >> Multiple of two numbers, but it isn't working and I've kinda hit a >> dead end on the thought- >> I hav

Re: [Tutor] Pygame problem with mac

2012-11-18 Thread Jonatán Guadamuz Espinoza
El nov 17, 2012 11:39 a.m., "Ciaran Mooney" escribió: > > Hi, > > Was hoping u could help me. > > I can't seem to download a version of pygame that is compatible with python 3.2 on my Mac powerbook with OS tiger. You could look at this page http://packages.debian.org/experimental/python3-pygame

Re: [Tutor] LCM

2012-11-18 Thread Andrew
On Wed, 14 Nov 2012 19:52:03 +0200, Selby Rowley Cannon wrote: Hey, I've been trying to write a function to find the Lowest Common Multiple of two numbers, but it isn't working and I've kinda hit a dead end on the thought-process end of things. Anyone mind looking at it, and tell

Re: [Tutor] Help with a SQL Statement

2012-11-18 Thread Alan Gauld
On 18/11/12 11:29, Khalid Al-Ghamdi wrote: The SQL statement below doesn't return anything.. and I don't know why... I've used the parans but still no luck. Any Suggestions? I'll restructure it to how I think you want it... cur.execute(""" select badge, name, stage, tc, major, package

Re: [Tutor] Help with a SQL Statement

2012-11-18 Thread Bod Soutar
On Nov 18, 2012 11:30 AM, "Khalid Al-Ghamdi" wrote: > > Hi, I found one typo in 'Workshop&' which should be 'Workshop%' but it still gives results containing majors with 'Customer%' and 'Warehouse%' in them... > > > On Sun, Nov 18, 2012 at 2:21 PM, Khalid Al-Ghamdi wrote: >> >> Hi All, >> >> The

Re: [Tutor] Help with a SQL Statement

2012-11-18 Thread Khalid Al-Ghamdi
Hi, I found one typo in 'Workshop&' which should be 'Workshop%' but it still gives results containing majors with 'Customer%' and 'Warehouse%' in them... On Sun, Nov 18, 2012 at 2:21 PM, Khalid Al-Ghamdi wrote: > Hi All, > > The SQL statement below doesn't return anything.. and I don't know why.

[Tutor] Help with a SQL Statement

2012-11-18 Thread Khalid Al-Ghamdi
Hi All, The SQL statement below doesn't return anything.. and I don't know why... I've used the parans but still no luck. Any Suggestions? cur.execute("""select badge, name, stage, tc, major, package, subject, course, sb_as from records where sb_as = 0 and (subject like 'Wo

Re: [Tutor] New to Python - simple question

2012-11-18 Thread ALAN GAULD
>>> And the relevant portion in imtools.py is: >>> def histeq(im,nbr_bins=256): >>>      """ Histogram equalization of a grayscale image. """ >>> >>>      #get image histogram >>>      imhist,bins = histogram(im.flatten(),nbr_bins,normed=True) >> >> >> This is the call, but where is histogram? If