Re: [Tutor] Ptyhon GUI doubt

2009-08-25 Thread Lie Ryan
Reddy Etikela, Rajasekhar wrote: Hi Rich, I am using my organization machine. I am not aware of the firewall which we are using and don't have the access to it. You can just ignore the message if you cannot the administrator to adjust the firewall's setting. Just be aware that when IDLE is

Re: [Tutor] Algorithm

2009-08-25 Thread kreglet
Wayne, Kent, Alan, and Mac Thank you for all the help and suggestions . Wayne and Kent, Both your solutions work great. The extra comments you gave on the code that I tried will help reduce the line count and make the code more readable in the rest of the project. Apparently, I still have a lo

Re: [Tutor] Algorithm

2009-08-25 Thread Kent Johnson
On Tue, Aug 25, 2009 at 9:55 PM, Wayne wrote: > I just did a quick test and this code seems to work correctly: > def countletters(word): >     lettercount = {} >     for letter in word: >         lettercount[letter] = lettercount.get(letter, 0) + 1 >     return lettercount > def comparewords(cmpwor

Re: [Tutor] Algorithm

2009-08-25 Thread Wayne
On Tue, Aug 25, 2009 at 2:14 PM, kreglet wrote: > > Wayne, > I appreciate your patience with me. I still can't get this to work: > > > from operator import itemgetter > class testwords: > def __init__(self): >self.lettercount={} >

Re: [Tutor] how to remove first '/'

2009-08-25 Thread davidwilson
Thank you for the replies. Original Message From: Emad Nawfal (عماد نوفل) To: davidwil...@safe-mail.net Cc: tutor@python.org Subject: Re: [Tutor] how to remove first '/' Date: Tue, 25 Aug 2009 18:01:26 -0400 > > > On Tue, Aug 25, 2009 at 5:55 PM, wrote: > > > > Hello, > >

Re: [Tutor] how to remove first '/'

2009-08-25 Thread عماد نوفل
On Tue, Aug 25, 2009 at 5:55 PM, wrote: > Hello, > I want to strip the first '/' from the following: > > '/path/to/file' > > How can I do this? > > Dave > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > If I

Re: [Tutor] how to remove first '/'

2009-08-25 Thread vince spicer
On Tue, Aug 25, 2009 at 3:55 PM, wrote: > Hello, > I want to strip the first '/' from the following: > > '/path/to/file' > > How can I do this? > > Dave > ___ > Tutor maillist - Tutor@python.org > http://mail.python.org/mailman/listinfo/tutor > there

[Tutor] how to remove first '/'

2009-08-25 Thread davidwilson
Hello, I want to strip the first '/' from the following: '/path/to/file' How can I do this? Dave ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Algorithm

2009-08-25 Thread Kent Johnson
On Tue, Aug 25, 2009 at 5:03 PM, kreglet wrote: > > Hello Kent, > > Yes I would like to see your implementation. It seems to work but I get > error at the end. > > concat=''.join > > mainword="python" > cmpword="pot" >  # sort the letters in the target word; for example 'python' becomes > 'hnopty'

Re: [Tutor] Algorithm

2009-08-25 Thread kreglet
Hello Kent, Yes I would like to see your implementation. It seems to work but I get error at the end. concat=''.join mainword="python" cmpword="pot" # sort the letters in the target word; for example 'python' becomes 'hnopty' tmplst=[] for letters in mainword: tmplst.append(letters) t

Re: [Tutor] Algorithm

2009-08-25 Thread kreglet
Wayne, I appreciate your patience with me. I still can't get this to work: from operator import itemgetter class testwords: def __init__(self): self.lettercount={} self.inword=False self.main

Re: [Tutor] Tutor Mailing List

2009-08-25 Thread Kent Johnson
On Tue, Aug 25, 2009 at 10:28 AM, John Jenkinson wrote: > For the time being, I would like to be removed from the Tutor Mailing List > for Python Users. Click on the link below and follow the directions... Kent > Thanks, > - John Jenkinson > ___ > Tutor

[Tutor] Tutor Mailing List

2009-08-25 Thread John Jenkinson
For the time being, I would like to be removed from the Tutor Mailing List for Python Users. Thanks, - John Jenkinson ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] Trouble with a Recipe ...

2009-08-25 Thread Garry Bettle
Many, many thanks Vern. For the life of me, I couldn't remember [] are for lists: I was trying with (). Guess I picked a bad day to stop sniffing glue! Cheers, Garry On Tue, Aug 25, 2009 at 15:55, Vern Ceder wrote: > At the top in the docstring it says, '"To", "Cc" and "Bcc" values must be >

Re: [Tutor] Trouble with a Recipe ...

2009-08-25 Thread Vern Ceder
At the top in the docstring it says, '"To", "Cc" and "Bcc" values must be *lists*'. That means instead of "To": "garry.bet...@gmail.com", you need "To": ["garry.bet...@gmail.com"] i.e. a list containing the destination address. That's so that you could send to, cc and bcc more than one addres

[Tutor] Trouble with a Recipe ...

2009-08-25 Thread Garry Bettle
Hi, Hope this email finds everyone well - roll on the weekend. I'm trying to run http://code.activestate.com/recipes/576824/ I'm in IDLE and I try: >>> email_it_via_gmail( {"To": "garry.bet...@gmail.com", "Subject": "Testing", >>> "From": "garry.bet...@gmail.com"}, text="Testing") but I get t

Re: [Tutor] Algorithm

2009-08-25 Thread Wayne
On Mon, Aug 24, 2009 at 8:58 PM, kreglet wrote: > > Wayne, > > > def myfunc(cmpword, mainword): > > for letter in cmpword: > > if mainword.gets(letter): > > if cmpword[letter] >mainword[letter]: > > return False > > else: > > return False > > I tried your f

Re: [Tutor] Ptyhon GUI doubt

2009-08-25 Thread Reddy Etikela, Rajasekhar
Hi Rich, I am using my organization machine. I am not aware of the firewall which we are using and don't have the access to it. Thanks, Raj -Original Message- From: Rich Lovely [mailto:roadier...@googlemail.com] Sent: Tuesday, August 25, 2009 4:15 PM To: Reddy Etikela, Rajasekhar Cc

Re: [Tutor] Algorithm

2009-08-25 Thread Kent Johnson
On Sun, Aug 23, 2009 at 6:06 PM, kreglet wrote: > > Hello, > >  The problem that I am having is writing an algorithm for finding all the > possible words from a given word. For example: python > > from "python" you can make the words pot, top, hop, not etc. There are few > examples for making anagr

Re: [Tutor] Ptyhon GUI doubt

2009-08-25 Thread Rich Lovely
2009/8/24 Reddy Etikela, Rajasekhar : > Hi, > > I am new to the Python. I have installed Python 2.6.2 version in windows XP. > > When I try to open the IDLE(Python GUI), getting the below message. Any > configuration settings required for this? > > > Please let me know the details. > > Thanks, > Ra