Re: [Tutor] Exit from program early

2005-11-04 Thread Hugo González Monteverde
or raise SystemExit Hugo Johan Geldenhuys wrote: > Try using 'sys.exit()' where you want the script to stop if you haven't > supplied enough arguments. > in you example, it looks like it will go on to the else anyway AND print > the string at the end. > > HTH, > Johan > > > Roy Bleasdale wr

Re: [Tutor] Exit from program early

2005-11-04 Thread Kent Johnson
Johan Geldenhuys wrote: > Try using 'sys.exit()' where you want the script to stop if you haven't > supplied enough arguments. > in you example, it looks like it will go on to the else anyway AND print > the string at the end. > > Roy Bleasdale wrote: >>In the example below I would like the prog

Re: [Tutor] Exit from program early

2005-11-03 Thread Johan Geldenhuys
Try using 'sys.exit()' where you want the script to stop if you haven't supplied enough arguments. in you example, it looks like it will go on to the else anyway AND print the string at the end. HTH, Johan Roy Bleasdale wrote: >Hi > >In the example below I would like the program to stop if I

[Tutor] Exit from program early

2005-11-03 Thread Roy Bleasdale
Hi In the example below I would like the program to stop if I forgot to provide an argument . Though I could do all my processing indented under the else statement, I was wondering if there was a command that would allow me to halt the program execution early. Regards, Roy # Example program