[BangPypers] suppressing the exception stack trace

Vishal vsapre80 at gmail.com
Tue Sep 15 17:26:03 CEST 2009


I would like to raise an exception of type Exception(), however the regular
exception stack trace needs to be supressed.

This is needed in a function that takes raw_input() from the user and based
on 'Y' or 'N', the function suspends further execution and returns to the
python prompt or continues. An exit() brings it out of the python
process....where as what is needed is coming back to the python prompt.

I want a custom message to appear instead of a regular exception stack trace

How to do this? any pointers...?
Thanks and best regards,
Vishal Sapre


"So say...Day by day, in every way, I am getting better, better and better
"A Strong and Positive attitude creates more miracles than anything else.
Because...Life is 10% how you make it, and 90% how you take it"
"Diamond is another piece of coal that did well under pressure”
"Happiness keeps u Sweet, Trials keep u Strong,
Sorrow keeps u Human, Failure Keeps u Humble,
Success keeps u Glowing, But only God Keeps u Going.....Keep Going....."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/bangpypers/attachments/20090915/1a2711a2/attachment.htm>

More information about the BangPypers mailing list