Re: [Tutor] smtplib starttls() error

2007-01-07 Thread Olen
I have also looked in all the documentation python 2.4.3 files I downloaded and this points out that I should have install the socket.ssl() my question is that is how do I install the socket.ssl() thank you ennma On 1/8/07, olen88 <[EMAIL PROTECTED]> wrote: > Hello, > I was wondering if

[Tutor] smtplib starttls() error

2007-01-07 Thread olen88
Hello, I was wondering if anyone could point me in the right direction my system info: Python 2.4.3 (#69, Apr 11 2006, 15:32:42) [MSC v.1310 32 bit (Intel)] on win32 as the subject says. starttls() returns the following error, reply, null = session.starttls(); File "C:\Py

Re: [Tutor] Tutor Digest, Vol 35, Issue 16

2007-01-07 Thread Alan Gauld
Congratulations. Just one wee niggle: > > while tosses<100: > tosses<100 You don't need this line, it doesn't do anything. HTH -- Alan Gauld Author of the Learn to Program web site http://www.freenetpages.co.uk/hp/alan.gauld ___ Tutor maillist

Re: [Tutor] Need help with rewriting script to use Decimal module

2007-01-07 Thread Terry Carroll
On Sun, 7 Jan 2007, Terry Carroll wrote: > ...Say you want to get an approximation of 0.096. Well, a good first > approximation is 1/10. But 1/10 is 0.010 Um, that should be "...is 0.100" ___ Tutor maillist - Tutor@python.org http://mail.pytho

Re: [Tutor] Tutor Digest, Vol 35, Issue 16

2007-01-07 Thread David Seto
Thanks, I finally figured it out. Here it is #Coin Toss Game import random print"This game will simulate 100 coin tosses and then tell you the number of head's and tails" tosses=0 heads=0 tails=0 while tosses<100: tosses<100 coin=random.randrange(2) tosses+=1 if coin==0: heads +=1

Re: [Tutor] Need help with rewriting script to use Decimal module

2007-01-07 Thread Terry Carroll
On Sat, 6 Jan 2007, Dick Moores wrote: > Well, I have to admit I don't understand your code at all. But I see it > works. A continuing fraction is an expression that looks like this: 1 A + -- 1 B +

Re: [Tutor] Query about using Pmw entry widget...

2007-01-07 Thread Alan Gauld
"Asrarahmed Kadri" <[EMAIL PROTECTED]> wrote > The dialog box, what I think is better than a 'visual warning' ; > because it > forces the user to correct the input error that he has made. A > visual > warning might be omitted by the user. I disagree. A dialog box in this situation has two bad

Re: [Tutor] Query about using Pmw entry widget...

2007-01-07 Thread Asrarahmed Kadri
Hey Luke, The dialog box, what I think is better than a 'visual warning' ; because it forces the user to correct the input error that he has made. A visual warning might be omitted by the user. REgards, Asrarahmed On 1/7/07, Luke Paireepinart <[EMAIL PROTECTED]> wrote: Alan Gauld wrote: > "Luk

Re: [Tutor] Question about ConfigParser

2007-01-07 Thread Jan Erik Moström
Reply to Dave Kuhlman <[EMAIL PROTECTED]> 07-01-06 15:26: >It's sort of hidden, but note the restriction to string values in >the docs on the set method: > >set(section, option, value) >If the given section exists, set the given option to the specified >value; otherwise raise NoSectionError. While

Re: [Tutor] Query about using Pmw entry widget...

2007-01-07 Thread John Fouhy
On 07/01/07, Alan Gauld <[EMAIL PROTECTED]> wrote: > I don;t have PMW installed. I tend to use Tix now that its part > of standard Python. However Grayson says this: Does Tix work with py2exe? That's why I gave up on it, a while ago.. > So it seems you need > > def numeric(val): > try: float

Re: [Tutor] Query about using Pmw entry widget...

2007-01-07 Thread Alan Gauld
"Luke Paireepinart" <[EMAIL PROTECTED]> wrote >> Its easier for the programmer but much worse for the user. >> We should always catch erroneous input as early as possible. > > The difference between a webpage and an application here is that if > the > user enters something incorrectly, he'll know

Re: [Tutor] Query about using Pmw entry widget...

2007-01-07 Thread Luke Paireepinart
Alan Gauld wrote: > "Luke Paireepinart" <[EMAIL PROTECTED]> wrote > > OP>> Can some one help me how to add validation : only integers are > allowed > OP>> and minimum value should be 1. > OP>> > OP>> timeInterval = Pmw.EntryField(label_text='Time Interval(in > OP>> sec.):',labelpos='w',validate =

Re: [Tutor] Help Installing Livewires

2007-01-07 Thread Luke Paireepinart
Stormtrooper30 wrote: > Hi > > I succesfully installed pygame and then attempted to install Livewires > on my Windows laptop. I am using Python 2.4 and when I try to call a > module from Livewires it says that "module Livewires does not exist". > I double clicked the setup program and it dis

Re: [Tutor] Query about using Pmw entry widget...

2007-01-07 Thread Alan Gauld
"Luke Paireepinart" <[EMAIL PROTECTED]> wrote OP>> Can some one help me how to add validation : only integers are allowed OP>> and minimum value should be 1. OP>> OP>> timeInterval = Pmw.EntryField(label_text='Time Interval(in OP>> sec.):',labelpos='w',validate = 'numeric') I don;t have PMW ins