A simple question: How to exit from a python script? Just like the exit() in C++
Daniel Lisewski
lisior at manta.univ.gda.pl
Thu Nov 21 02:20:53 EST 2002
On Thu, 21 Nov 2002, Wang Hanbo wrote:
> Hi,
>
> I have a simple question as is written in the header, how can I
> exit from a python program using a call such as "exit()" in C++?
>
> I am a novice on this list, and also a rookie on python
> language, all of you answers will be my best impetus!
> Thanks
>
There is a procedure called exit in module sys. So to use ut you have to
write sys.exit(), and of course you need to import sys module.
Hope that will help.
Daniel ( lisior at manta.univ.gda.pl )
More information about the Python-list
mailing list