On Thu, Aug 12, 2010 at 6:35 AM, Steven D'Aprano wrote:
> On Thu, 12 Aug 2010 04:59:26 pm Chris Fuller wrote:
> > The preferred and most graceful way is to use neither, as others have
> > pointed out. However, you can't return an exit code that way
>
> Of course you can. Exiting out the end of th
On Thu, 12 Aug 2010 04:59:26 pm Chris Fuller wrote:
> The preferred and most graceful way is to use neither, as others have
> pointed out. However, you can't return an exit code that way
Of course you can. Exiting out the end of the program returns an exit
code of zero, and raising an uncaught e
The preferred and most graceful way is to use neither, as others have pointed
out. However, you can't return an exit code that way, and it sometimes isn't
feasible to structure your code to allow it. I prefer SystemExit, because it
doesn't require adding something to the namespace (the sys mo
On Wed, Aug 11, 2010 at 11:06 PM, James Mills
wrote:
> On Thu, Aug 12, 2010 at 1:42 PM, Bill Allen wrote:
>> I have only learned a couple of ways to cause a Python program to exit:
>> sys.exit(0) & raise.SystemExit . I am using this in a try/except block.
>> Which is preferred? Are there othe
On Thu, Aug 12, 2010 at 1:42 PM, Bill Allen wrote:
> I have only learned a couple of ways to cause a Python program to exit:
> sys.exit(0) & raise.SystemExit . I am using this in a try/except block.
> Which is preferred? Are there other, better ways?
The normal pattern is to have an entry poi
I have only learned a couple of ways to cause a Python program to exit:
sys.exit(0) & raise.SystemExit . I am using this in a try/except block.
Which is preferred? Are there other, better ways?
Thanks,
Bill Allen
___
Tutor maillist - Tutor@python.