Re: IndentationError: expected an indented block but it's there

2013-05-29 Thread Chris Angelico
On Wed, May 29, 2013 at 2:53 AM, Peter Otten <__pete...@web.de> wrote: > Chris Angelico wrote: > >> On Wed, May 29, 2013 at 2:19 AM, Peter Otten <__pete...@web.de> wrote: >>> Solution: configure your editor to use four spaces for indentation. >> >> ITYM eight spaces. > > I meant: one hit of the Tab

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Peter Otten
Chris Angelico wrote: > On Wed, May 29, 2013 at 2:19 AM, Peter Otten <__pete...@web.de> wrote: >> Solution: configure your editor to use four spaces for indentation. > > ITYM eight spaces. I meant: one hit of the Tab key should add spaces up to the next multiple of four. Which implies > But t

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Chris Angelico
On Wed, May 29, 2013 at 2:19 AM, Peter Otten <__pete...@web.de> wrote: > Solution: configure your editor to use four spaces for indentation. ITYM eight spaces. But the real solution is to not mix tabs and spaces. Stick to one or the other and you're safe. ChrisA -- http://mail.python.org/mailman

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Peter Otten
JackM wrote: > Having a problem getting a py script to execute. Got this error: > > File "/scripts/blockIPv4.py", line 19 > ip = line.split(';')[0] > ^ > IndentationError: expected an indented block > > > I'm perplexed bec

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Steven D'Aprano
On Tue, 28 May 2013 11:32:06 -0400, JackM wrote: > Having a problem getting a py script to execute. Got this error: > > File "/scripts/blockIPv4.py", line 19 > ip = line.split(';')[0] > ^ > IndentationError: expected an indented block > >

Re: IndentationError: expected an indented block but it's there

2013-05-28 Thread Michael Torrie
On 05/28/2013 09:32 AM, JackM wrote: > Having a problem getting a py script to execute. Got this error: > > File "/scripts/blockIPv4.py", line 19 > ip = line.split(';')[0] > ^ > IndentationError: expected an indented block > I'm perplexed

IndentationError: expected an indented block but it's there

2013-05-28 Thread JackM
Having a problem getting a py script to execute. Got this error: File "/scripts/blockIPv4.py", line 19 ip = line.split(';')[0] ^ IndentationError: expected an indented block I'm perplexed because the code that the error refers to *is* indented: with open(&#

Re: IndentationError

2009-12-11 Thread Lie Ryan
On 12/10/2009 6:32 AM, hong zhang wrote: List, I got error says IndentationError in end of line. I could not figure out why. See following: $ ./cont-mcs File "./cont-mcs", line 264 mcs1 = ht_val+cck_val+green_val+fat_v

Re: IndentationError

2009-12-11 Thread Ben Finney
hong zhang writes: > I got error says IndentationError in end of line. > I could not figure out why. Nor can we, without seeing the code to compare indentation levels. > Thanks for help. Please construct a minimal example (not a whole huge program), that we can run to show the

Re: IndentationError

2009-12-10 Thread Peter Pearson
On Fri, 11 Dec 2009 12:57:15 +1100, Lie Ryan wrote: > On 12/10/2009 6:32 AM, hong zhang wrote: >> List, >> >> I got error says IndentationError in end of line. >> I could not figure out why. See following: >> >> $ ./cont-mcs >>File ".

Re: IndentationError

2009-12-10 Thread Gabriel Genellina
En Wed, 09 Dec 2009 16:32:18 -0300, hong zhang escribió: I got error says IndentationError in end of line. I could not figure out why. See following: $ ./cont-mcs File "./cont-mcs", line 264 mcs1 = ht_val+cck_val+green_val+fat_v

Re: IndentationError

2009-12-10 Thread Terry Reedy
hong zhang wrote: List, I got error says IndentationError in end of line. I could not figure out why. See following: $ ./cont-mcs File "./cont-mcs", line 264 mcs1 = ht_val+cck_val+green_val+fat_val+sgi_val ^ IndentationError

IndentationError

2009-12-10 Thread hong zhang
List, I got error says IndentationError in end of line. I could not figure out why. See following: $ ./cont-mcs File "./cont-mcs", line 264 mcs1 = ht_val+cck_val+green_val+fat_val+sgi_val ^ IndentationError: unindent does not

Re: IndentationError: unexpected indent

2007-06-16 Thread Dave Borne
> It would be very helpful when Python would warn you when there are tabs in > your source. invoke python with the -t option for warnings about tabs or -tt for errors. -Dave -- http://mail.python.org/mailman/listinfo/python-list

Re: IndentationError: unexpected indent

2007-06-16 Thread Wim Vogelaar
> How is he supposed to run MS notepad on X11? :) > I am saying MS notepad, but any software (running on Linux) showing you clearly the tabs will help. It would also be very convenient when python would deal with tabs in a human friendly way. Wim Vogelaar, http://home.wanadoo.nl/w.h.vogelaar/

Re: IndentationError: unexpected indent

2007-06-16 Thread Wim Vogelaar
in your source. So instead of only saying: "IndentationError: unexpected indent" there could be an additional message saying: "there are tab characters in that line, please remove them". Wim Vogelaar, http://home.wanadoo.nl/w.h.vogelaar/ -- http://mail.python.org/mailman/listinfo/python-list

Re: IndentationError: unexpected indent

2007-06-15 Thread Bjoern Schliessmann
"Wim Vogelaar" wrote: > You have possibly unvisible tab characters in your file. > Just copy your lines to the simple MS notepad and try again. How is he supposed to run MS notepad on X11? :) Regards, Björn P.S.: YES, I know there is wine. -- BOFH excuse #126: it has Intel Inside -- htt

Re: IndentationError: unexpected indent

2007-06-14 Thread Laurent Pointal
n the .py script from shell saying: > > print 'Monty Python's Flying Circus has a ' within it...' > ^ > IndentationError: unexpected indent > > I have tried to indent the print statement 8 blanks but that does not > help. Any hints? You have

Re: IndentationError: unexpected indent

2007-06-14 Thread Wim Vogelaar
You have possibly unvisible tab characters in your file. Just copy your lines to the simple MS notepad and try again. Wim Vogelaar, http://home.wanadoo.nl/w.h.vogelaar/ -- http://mail.python.org/mailman/listinfo/python-list

IndentationError: unexpected indent

2007-06-14 Thread desktop
hon's Flying Circus has a ' within it...' ^ IndentationError: unexpected indent I have tried to indent the print statement 8 blanks but that does not help. Any hints? -- http://mail.python.org/mailman/listinfo/python-list

Re: IndentationError: expected an indented block

2006-11-09 Thread Steve Holden
Antonios Katsikadamos wrote: > hi all. I am using python 2.4. I have to run an older python code and > when i run it i get the following message > > IndentationError: expected an indented block. > > 1)what does this mean? Just what it did the first time you asked. This is a

IndentationError: expected an indented block

2006-11-09 Thread Antonios Katsikadamos
hi all. I am using python 2.4. I have to run an older python code and when i run it i get the following messageIndentationError: expected an indented block.1)what does this mean?2)how can i overcome this problemThanks for any advice.kind regards,Antonios Sponsored LinkMortgage rates near his

Re: python Error: IndentationError: expected an indented block

2006-11-08 Thread Ben Finney
Please don't post HTML message bodies to a public forum. Antonios Katsikadamos <[EMAIL PROTECTED]> writes: > hi all. I am using python 2.4. I have to run an older python code > and when i run it i get the following message > IndentationError: expected an indented block. >

Re: python Error: IndentationError: expected an indented block

2006-11-08 Thread Vyacheslav Sotnikov
Antonios Katsikadamos пишет: > hi all. I am using python 2.4. I have to run an older python code and when i > run it i get the following message > > IndentationError: expected an indented block. > > 1)what does this mean? http://www.python.org/doc/2.4.3/ref/indentation.h

python Error: IndentationError: expected an indented block

2006-11-08 Thread Antonios Katsikadamos
hi all. I am using python 2.4. I have to run an older python code and when i run it i get the following messageIndentationError: expected an indented block.1)what does this mean?2)how can i overcome this problemThanks for any advice.kind regards,Antonios Sponsored Link Free Uniden 5.8GHz Phone S

Re: IndentationError: expected an indented block

2006-09-03 Thread Hendrik van Rooyen
"Georg Brandl" <[EMAIL PROTECTED]> Wrote: | [EMAIL PROTECTED] wrote: | > Hendrik van Rooyen wrote: | >> <[EMAIL PROTECTED]> Wrote: | >> | >> | >> | | >> | Haha. How can I fix this! | >> | | >> | | >> | | >> | >> Use either tabs, or spaces, but not both | >> | >> - Hendrik | > | > Haha. I kn

Re: IndentationError: expected an indented block

2006-09-02 Thread Georg Brandl
[EMAIL PROTECTED] wrote: > Hendrik van Rooyen wrote: >> <[EMAIL PROTECTED]> Wrote: >> >> >> | >> | Haha. How can I fix this! >> | >> | >> | >> >> Use either tabs, or spaces, but not both >> >> - Hendrik > > Haha. I know. I just find it silly that a language insists on > indentation. I'd long k

Re: IndentationError: expected an indented block

2006-09-02 Thread casioculture
Hendrik van Rooyen wrote: > <[EMAIL PROTECTED]> Wrote: > > > | > | Haha. How can I fix this! > | > | > | > > Use either tabs, or spaces, but not both > > - Hendrik Haha. I know. I just find it silly that a language insists on indentation. I'd long known it but just was reminded of it when I m

Re: IndentationError: expected an indented block

2006-09-02 Thread Hendrik van Rooyen
<[EMAIL PROTECTED]> Wrote: | | Haha. How can I fix this! | | | Use either tabs, or spaces, but not both - Hendrik -- http://mail.python.org/mailman/listinfo/python-list

Re: IndentationError: expected an indented block

2006-09-01 Thread John Machin
[EMAIL PROTECTED] wrote: > Haha. How can I fix this! Haha to you too. Position your cursor at the scene of the crime. Hit the space-bar 4 times. Hit Ctrl-s. Try running it again. If you would prefer a more sensible answer, you might like to ask a more sensible question, which would include a cop

IndentationError: expected an indented block

2006-09-01 Thread casioculture
Haha. How can I fix this! -- http://mail.python.org/mailman/listinfo/python-list

py_compile vs. IndentationError

2005-03-26 Thread Mr. Magoo
Why does py_compile print IndentationError in a different format than SyntaxError? It makes it harder to parse the output in a non-python program. Sorry: IndentationError: ('unindent does not match any outer indentation level', ('foo.py', 19, 17, '\t\t\t return 0.0 \n