problem with program - debugging leading nowhere

M

Matthew Sacks

i am trying to figure out what has gone wrong in my python program. it
is complaining that there is an indendation error. should be simple
enough but im stuck on this one. if anyone can help unjolt me it would
be appreciated.

thank you



error message:
Traceback (most recent call last):
File "<string>", line 1, in <string>
IndentationError: expected an indented block (<string>, line 39)

code:
http://pastebin.com/f2f971f91
 
J

John Machin

i am trying to figure out what has gone wrong in my python program. it
is complaining that there is an indendation error. should be simple
enough but im stuck on this one. if anyone can help unjolt me it would
be appreciated.

thank you

error message:
Traceback (most recent call last):
  File "<string>", line 1, in <string>
IndentationError: expected an indented block (<string>, line 39)

code:http://pastebin.com/f2f971f91
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pastebin.py", line 31
elif o is not "":
^
IndentationError: expected an indented block

Dunno how you managed line 39.

What you have there is:
for o, a in optlist:
if o == "-h":
#usage()
elif o is not "":
which is equivalent to:
for o, a in optlist:
if o == "-h":
elif o is not "":
which is not such a good idea.

BTW, why aren't you using optparse?

HTH,
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top