Re: [Tutor] What's the keyword for the Python creed?

2011-09-15 Thread Christian Witts
On 2011/09/15 08:57 PM, Richard D. Moores wrote: Thanks, all. Good to have that at hand. antigravity: any more? Dick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

[Tutor] Strange zip syntax

2011-09-15 Thread Brett Ritter
I ran into this article ( http://blog.adku.com/2011/09/hodgepodge-of-python.html ) and found myself temporarily stymied by one line it in: zip(*[iter(a)]*2) Used like this: >>> a = ['a','1','b','2','c','3'] >>> zip(*[iter(a)]*2) [('a', '1'), ('b', '2'), ('c', '3')] While I'm unlikely to use suc

[Tutor] help importing pygame

2011-09-15 Thread Chad Reynolds
For starters, I am a newish python programmer, far enough along to have my feet wet. Running Mac OSX Lion (10.7), and python 2.7.2. I am trying to expand my knowledge and use some packages outside of the base python library. Games are interesting so I decided I'd try pygame af

[Tutor] Please review my code

2011-09-15 Thread Emeka
Hello All, While trying to learn Python I developed a small game, Text Text. It has rough edges and may not meet your class. However, by reviewing it you'll be helping me to advance. It was only tested on a Windows Box, but I see no reason why it would not work on Unix family. https://github.c

Re: [Tutor] What's the keyword for the Python creed?

2011-09-15 Thread Richard D. Moores
Thanks, all. Good to have that at hand. antigravity: any more? Dick ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor

Re: [Tutor] What's the keyword for the Python creed?

2011-09-15 Thread Prasad, Ramit
>import antigravity >...for another Pythonic easter egg...  Though I think this one requires Python >3?  2.7?  Can't remember. Works in 2.7 but not 2.6.4 Ramit Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology 712 Main Street | Houston, TX 77002 work phone: 713 - 216 - 542

Re: [Tutor] What's the keyword for the Python creed?

2011-09-15 Thread Jordan
I think you mean the Zen of Python: http://www.python.org/dev/peps/pep-0020/ The command is >>> import this -- Jordan On 09/15/2011 11:19 AM, Richard D. Moores wrote: > You know, at the interactive prompt you enter some Monty Python word > that I can't remember, and you get a small list of pithy py

Re: [Tutor] What's the keyword for the Python creed?

2011-09-15 Thread Scott Nelson
On Thu, Sep 15, 2011 at 1:19 PM, Richard D. Moores wrote: > You know, at the interactive prompt you enter some Monty Python word > that I can't remember, and you get a small list of pithy pythonic > advice such as "explicit is better than implicit", etc. > import this You can also do... import

[Tutor] What's the keyword for the Python creed?

2011-09-15 Thread Richard D. Moores
You know, at the interactive prompt you enter some Monty Python word that I can't remember, and you get a small list of pithy pythonic advice such as "explicit is better than implicit", etc. Thanks, Dick Moores ___ Tutor maillist - Tutor@python.org To

Re: [Tutor] making lists of prime numbers

2011-09-15 Thread Dave Angel
On 09/14/2011 10:35 PM, Andre Engels wrote: On Thu, Sep 15, 2011 at 4:01 AM, c smithwrote: hi list, i am trying the MIT opencourseware assignments. one was to find the 1000th prime. since this isn't actually my homework, I modified the solution as I would like to collect lists of primes and non

Re: [Tutor] making lists of prime numbers

2011-09-15 Thread Alan Gauld
On 15/09/11 03:01, c smith wrote: am I passing arguments from the command line correctly? Yes, although not converting to an int. this seems to count by twos (going through both 'if statements' maybe?) I thought the 'break' would send control back to the 'while' basically, is there an obviou