Steven D'Aprano <[EMAIL PROTECTED]> wrote:
> I'm writing a command-line application that is meant to be relatively
> user friendly to non-technical users.
> Consequently, I'd like to suppress Python's tracebacks if an error does
> occur, replacing it with a more friendly error message. I'm doin
On Oct 23, 12:07 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
...
> if expert_mode:
> # experts get the full traceback with no hand-holding.
> raise
> else:
> # print a more friendly error message
...
Another approach is to always print a frien
On Oct 23, 11:07 am, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> I'm writing a command-line application that is meant to be relatively
> user friendly to non-technical users.
>
> (Some wags might like to say that "user friendly" and "command-line
> application" are, by definitio
On Oct 23, 7:07 pm, Steven D'Aprano <[EMAIL PROTECTED]
cybersource.com.au> wrote:
> I'm writing a command-line application that is meant to be relatively
> user friendly to non-technical users.
>
> (Some wags might like to say that "user friendly" and "command-line
> application" are, by definition
I'm writing a command-line application that is meant to be relatively
user friendly to non-technical users.
(Some wags might like to say that "user friendly" and "command-line
application" are, by definition, contradictory. I disagree.)
Consequently, I'd like to suppress Python's tracebacks if