I have a call which needs to reply 2.1 or 2.8 and report an error if not:
def ask_dau_version():
"""Determine the product issue of the DAU."""
dau_version = None
while dau_version not in ("2.8", "2.1"):
dau_version = raw_input("\n\tIs the DAU a version 2.1 or 2.8, please
enter only 2.1 or 2.8 ")
print"\n\t\aError! - please enter only 2.1 or 2.8."
else:
print""
return dau_version
I can see why it isn't working, the error message is in the wrong place, but
I can't see a simple way around it (wood for the trees)
Gaz
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor