Re: Re Following syntax error in Mac OX10.7 Terminal

2012-06-29 Thread Andrew Berg
On 6/29/2012 10:58 AM, David Thomas wrote: > Just discovered this in the tutorial further down. I'm currently learning > Python 2 because there seems to be a lot of tutorials out there covering > Python 2 rather than 3. The latest edition (3rd?) of Programming Python by Mark Lutz covers py3k (it

Re Re Following syntax error in Mac OX10.7 Terminal

2012-06-29 Thread Sergi Pasoev
> Just discovered this in the tutorial further down. I'm currently > learning Python 2 because there seems to be a lot of tutorials out there > covering Python 2 rather than 3. While deciding which version of Python to learn, a better counsel could be found here: http://wiki.python.org/moin/Pyth

Re: Re Following syntax error in Mac OX10.7 Terminal

2012-06-29 Thread Ben Finney
David Thomas writes: > Hi yeah I'm currently learning python 2 at the moment and the tutorial > that I am studying doesn't explain about indentation. You might be better served by the official Python tutorial http://docs.python.org/tutorial/>. If you work through it from beginning to end, doing

Re: Re Following syntax error in Mac OX10.7 Terminal

2012-06-29 Thread David Thomas
On Friday, June 29, 2012 4:21:56 PM UTC+1, MRAB wrote: > On 29/06/2012 16:13, David Thomas wrote: > > On Thursday, June 28, 2012 6:30:42 PM UTC+1, Sergi Pasoev wrote: > >> You just have to consider that indentation matters in Python, so you > >> have to type the code in Python interpreter as you ha

Re: Re Following syntax error in Mac OX10.7 Terminal

2012-06-29 Thread MRAB
On 29/06/2012 16:13, David Thomas wrote: On Thursday, June 28, 2012 6:30:42 PM UTC+1, Sergi Pasoev wrote: You just have to consider that indentation matters in Python, so you have to type the code in Python interpreter as you have written it below, that is, press Tab before each line when you ar

Re: Re Following syntax error in Mac OX10.7 Terminal

2012-06-29 Thread David Thomas
On Thursday, June 28, 2012 6:30:42 PM UTC+1, Sergi Pasoev wrote: > You just have to consider that indentation matters in Python, so you > have to type the code in Python interpreter as you have written it > below, that is, press Tab before each line when you are inside the > 'while (or any other li

Re: Following syntax error in Mac OX10.7 Terminal

2012-06-28 Thread David Thomas
Thank you very much I didn't realise that the indentation was important. The IDE indents automatically whilst terminal doesn't. Thanks for pointing it out. -- http://mail.python.org/mailman/listinfo/python-list

Re: Following syntax error in Mac OX10.7 Terminal

2012-06-28 Thread Andrew Berg
On 6/28/2012 12:11 PM, David Thomas wrote: > Hi, > I have the following error regarding a loop tutorial found on > http://www.sthurlow.com/python/lesson04/ > a=0 while a<10: > ... a=a+1 > File "", line 2 > a=a+1 > ^ > IndentationError: expected an indented block You indented

Re Following syntax error in Mac OX10.7 Terminal

2012-06-28 Thread Sergi Pasoev
You just have to consider that indentation matters in Python, so you have to type the code in Python interpreter as you have written it below, that is, press Tab before each line when you are inside the 'while (or any other like for, if, with, etc.) block. a=0 while a<10: a=a+1 print a I