Python Error:IndentationError: expected an indented block

2006-11-08 Thread Antonios Katsikadamos
hi all. I try to run an old python code and i get the following message  File "/home/antonis/db/access.py", line 119  def DoCsubnet1 (action, subject, target, args): # DoC servers net  ^ IndentationError: expected an indented block  1) and I don't know what causes it. I would be grate full if you could give me a tip.  2) how can i overcome it? Can i use the keyword pass?and if how ccan i use it   Kind regards,  Antonios  


Sponsored Link
For just $24.99/mo., Vonage offers unlimited local and long- distance calling. Sign up now.-- 
http://mail.python.org/mailman/listinfo/python-list

Re: Python Error:IndentationError: expected an indented block

2006-11-08 Thread Steve Holden
Antonios Katsikadamos wrote:
 hi all. I try to run an old python code and i get the following message
 
 File /home/antonis/db/access.py, line 119
 def DoCsubnet1 (action, subject, target, args): # DoC 
 servers net
   ^
 IndentationError: expected an indented block
 
 1) and I don't know what causes it. I would be grate full if you could 
 give me a tip.
 
Typically you have a line ending in a colon (like an if or for 
statement) where the next line isn't at a higher indented level.

This is an indication that the code NEVER worked.

 2) how can i overcome it? Can i use the keyword pass?and if how ccan i 
 use it
 
You could just blindly add an indented pass statement, but there is of 
course no guarantee this will be what you require.

How long is the code? Would it be practical to publish it here? (If it's 
more than 200 lines assume the answer to that last question is no).

regards
  Steve
-- 
Steve Holden   +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd  http://www.holdenweb.com
Skype: holdenweb   http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Python Error:IndentationError: expected an indented block

2006-11-08 Thread jim-on-linux

try this

  def DoCsubnet1 (action, subject, target,
args): 
   pass



jim-on-linux
http://www.inqvista.com




On Wednesday 08 November 2006 10:47, Antonios 
Katsikadamos wrote:
 hi all. I try to run an old python code and i
 get the following message

  File /home/antonis/db/access.py, line 119
  def DoCsubnet1 (action, subject, target,
 args): # DoC servers net ^
  IndentationError: expected an indented block

  1) and I don't know what causes it. I would be
 grate full if you could give me a tip.

  2) how can i overcome it? Can i use the
 keyword pass?and if how ccan i use it


  Kind regards,

  Antonios


-- 
http://mail.python.org/mailman/listinfo/python-list