Re: [Tutor] Negative IF conditions

2005-02-11 Thread Jeremy Jones
h work so if one preferred over the other? Thanks Mark Brown ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor Jeremy Jones ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] help with refactoring needed -- which approach is morePythonic?

2005-02-11 Thread Jeremy Jones
, though. Best to all, Brian vdB PS Thanks for the reply to my venting question, Kent. ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor Jeremy Jones ___ Tutor maillist - T

Re: [Tutor] What does this mean

2005-02-12 Thread Jeremy Jones
and 'boo' with respective values 1,2,3. The **kwargs notations says, "Assign any subsequent keyword arguments to kwargs." NOTE - you don't have to use *args and **kwargs. You just have to use the * and **. Jeremy Jones ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] count words

2005-02-15 Thread Jeremy Jones
text = text.replace(punct, ' ') words = text.split() word_dict = {} for word in words:     word_dict[word] = word_dict.get(word, 0) + 1 word_list = word_dict.keys() word_list.sort() for word in word_list:     print "%-25s%d" % (word, word_dict[word]) Jeremy Jones __

Re: [Tutor] Queued threads

2005-02-16 Thread Jeremy Jones
Not to beat a dead horse, but Liam Clarke wrote: Oops, you probably want to do this then- for i in range( 0, 3 ): oThread = Thread( target=mainFunction ).start() Thread.start() looks like it returns None. # In [23]: from threading import Thread In [24]: impo

Re: [Tutor] Problem with variables

2005-02-16 Thread Jeremy Jones
0]: print \    : """    : %s woke up early in the morning. But, it was unusal by %s.    : %s pillow was with %s. %s didn't want to wake up But, %s    : tried my best and woke up. it was so amazing!""" % (I,me,my,me,I,I) Allen woke up early in the m

Re: [Tutor] Interesting problem

2005-06-23 Thread Jeremy Jones
Smith, Jeff wrote: >Consider a class with a lt of properties. I would like a member >function which generates a dictionary where the keys are the property >names and the values are the property values? > >Is this clear? > >How might I go about this? > >Jeff >__

Re: [Tutor] Please Help: Hacking

2005-07-22 Thread Jeremy Jones
;___ >Tutor maillist - Tutor@python.org >http://mail.python.org/mailman/listinfo/tutor > > Here you go. This should be enlightening: http://www.catb.org/~esr/writings/unix-koans/script-kiddie.html Jeremy Jones ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] i know this should be easy

2005-08-17 Thread Jeremy Jones
nephish wrote: >Hey there, >i have a simple question. >if something returns a true or false, how do i test for it with an if >statement? >i am using pygtk with a toggle button that returns TRUE if checked and >FALSE if not. >do i need quotes around the TRUE / FALSE or should i use 1 and 0? > >Au

Re: [Tutor] pure function problem

2010-09-23 Thread Jeremy Jones
The problem is that your class definition doesn't do anything to explicitly set those attributes. On Thu, Sep 23, 2010 at 4:58 AM, Roelof Wobben wrote: > class tijd : >    pass You're not doing any explicit setting of attributes at the class level. > time = tijd() > time.hour = 20 > time.minu

Re: [Tutor] I am looking for a book on Beginners who never programmed before or have no experience in programming

2010-09-28 Thread Jeremy Jones
On Sat, Sep 25, 2010 at 11:50 PM, Preetinder Singh wrote: > Hi I am trying to learn how to program, I want to become a software > developer so I can develop a software and also understand how to write my > own software not copying someone else. So if there any book or online > tutorials for comple

Re: [Tutor] I am looking for a book on Beginners who never programmed before or have no experience in programming

2010-09-28 Thread Jeremy Jones
On Tue, Sep 28, 2010 at 7:47 AM, Steven D'Aprano wrote: > On Tue, 28 Sep 2010 07:37:12 pm Jeremy Jones wrote: > >> "Head First Programming: A Learner's Guide to Programming Using the >> Python Language" by David Griffiths and Paul Barry was a great read. &