Re: error handling in user input: is this natural or just laborious
- From: "bruno de chez modulix en face" <bruno@xxxxxxxxxxx>
- Date: 7 Oct 2006 06:10:08 -0700
sam a écrit :
(snip)
i'm still in the early stages, and am trying to code something simple(snip)
and interactive to get the percentages of the portfolio in the five
different investment categories. i thought i'd get in with the error
handling early so if someone types in something wrong (like a word), or
the numbers don't add up to 100%, the error would be caught immediately
and the user sent back to the start of the loop.
You may want to have a look at the formencode package. While mostly
used in web apps, it's perfectly usable for all kind of
python<->outside world data conversion/validation.
HTH
.
- Follow-Ups:
- References:
- Prev by Date: Re: Names changed to protect the guilty
- Next by Date: curses problem reading cursor keys
- Previous by thread: Re: error handling in user input: is this natural or just laborious
- Next by thread: Re: error handling in user input: is this natural or just laborious
- Index(es):
Relevant Pages
|