Greetings Selby,
: I have a small, [for the most part] functioning
: translation app for Rydish, a language created for the sole
: purpose of an RPG. The only problem is when I enter a word that
: has not yet been translated, I get this error:
:
: Traceback (most recent call last):
: File "translator.py", line 25, in <module>
: Etranslate()
: File "translator.py", line 14, in Etranslate
: print(Edictionary[Eword])
: KeyError: 'world'
:
: Is there a way to print a user-freindly message instead of
: displaying a traceback? Thanks, -Selby
Try the two techniques here (and the one Joel just posted):
http://mail.python.org/pipermail/tutor/2012-June/090025.html
-Martin
(You asked your question much more clearly this time and with a code
sample--so, keep it up and enjoy the Python.)
--
Martin A. Brown
http://linux-ip.net/
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor